Changeset 02ce8a0 in mainline


Ignore:
Timestamp:
2012-11-25T00:10:37Z (11 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7462674
Parents:
94b696c
Message:

Test more numbers and reduce the number of used arrays.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tester/float/softfloat1.c

    r94b696c r02ce8a0  
    3939#include "../tester.h"
    4040
    41 #define OPERANDS  6
     41#define OPERANDS  10
    4242#define PRECISION  10000
    4343
     
    5656    cmptype_t *);
    5757
    58 static float fop_a[OPERANDS] =
    59         {3.5, -2.1, 100.0, 50.0, -1024.0, 0.0};
    60 
    61 static float fop_b[OPERANDS] =
    62         {-2.1, 100.0, 50.0, -1024.0, 3.5, 0.0};
    63 
    64 static double dop_a[OPERANDS] =
    65         {3.5, -2.1, 100.0, 50.0, -1024.0, 0.0};
    66 
    67 static double dop_b[OPERANDS] =
    68         {-2.1, 100.0, 50.0, -1024.0, 3.5, 0.0};
    69 
    70 static unsigned int uop_a[OPERANDS] =
    71         { 4, 2, 100, 50, 1024, 0 };
     58#define NUMBERS \
     59        3.5, -2.1, 100.0, 50.0, -1024.0, 0.0, 768.3156, 1080.499999, -600.0, 1.0
     60
     61static float fop_a[OPERANDS] = {
     62        NUMBERS
     63};
     64
     65static double dop_a[OPERANDS] = {
     66        NUMBERS
     67};
     68
     69static unsigned int uop_a[OPERANDS] = {
     70        4, -100, 100, 50, 1024, 0, 1000000, -1U, 0x80000000U, 500
     71};
    7272
    7373static cmptype_t cmpabs(cmptype_t a)
     
    127127        float_binary_op_t op = (float_binary_op_t) f;
    128128       
    129         op(fop_a[i], fop_b[j], &c, &sc);
     129        op(fop_a[i], fop_a[j], &c, &sc);
    130130
    131131        *pic = (cmptype_t) (c * PRECISION);
     
    142142        double_binary_op_t op = (double_binary_op_t) f;
    143143       
    144         op(dop_a[i], dop_b[j], &c, &sc);
     144        op(dop_a[i], dop_a[j], &c, &sc);
    145145
    146146        *pic = (cmptype_t) (c * PRECISION);
     
    154154        double_cmp_op_t op = (double_cmp_op_t) f;
    155155       
    156         op(dop_a[i], dop_b[j], pis, piss);
     156        op(dop_a[i], dop_a[j], pis, piss);
    157157}
    158158
Note: See TracChangeset for help on using the changeset viewer.