Changeset 58775d30 in mainline for uspace/app/tester/float/float2.c


Ignore:
Timestamp:
2015-03-16T16:07:21Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2003739
Parents:
6069061 (diff), 795e2bf (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Mainline changes

File:
1 edited

Legend:

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

    r6069061 r58775d30  
    5757const char *test_float2(void)
    5858{
     59        bool fail = false;
     60       
    5961        for (unsigned int i = 0; i < OPERANDS; i++) {
    6062                double res = trunc(arguments[i]);
     
    6365               
    6466                if (res_int != corr_int) {
    65                         TPRINTF("Double truncation failed (%" PRId64 " != %" PRId64 ")\n",
    66                             res_int, corr_int);
    67                         return "Double truncation failed";
     67                        TPRINTF("Double truncation failed (%" PRId64 " != %" PRId64
     68                            ", arg %u)\n", res_int, corr_int, i);
     69                        fail = true;
    6870                }
    6971        }
     
    7577               
    7678                if (res_int != corr_int) {
    77                         TPRINTF("Double sine failed (%" PRId64 " != %" PRId64 ")\n",
    78                             res_int, corr_int);
    79                         return "Double sine failed";
     79                        TPRINTF("Double sine failed (%" PRId64 " != %" PRId64
     80                            ", arg %u)\n", res_int, corr_int, i);
     81                        fail = true;
    8082                }
    8183        }
     
    8789               
    8890                if (res_int != corr_int) {
    89                         TPRINTF("Double cosine failed (%" PRId64 " != %" PRId64 ")\n",
    90                             res_int, corr_int);
    91                         return "Double cosine failed";
     91                        TPRINTF("Double cosine failed (%" PRId64 " != %" PRId64
     92                            ", arg %u)\n", res_int, corr_int, i);
     93                        fail = true;
    9294                }
    9395        }
    9496       
     97        if (fail)
     98                return "Floating point imprecision";
     99       
    95100        return NULL;
    96101}
Note: See TracChangeset for help on using the changeset viewer.