shoebill/core/SoftFloat/test.c
pruten bb2ec0a27d Working on a total FPU rewrite based on softfloat
5 instructions down, a million more to go
2014-09-27 13:46:57 -04:00

23 lines
408 B
C

#include <stdio.h>
#include <stdint.h>
#include <math.h>
#include "softfloat.h"
floatx80 f[8];
int main (void)
{
float128 a = int64_to_float128(123);
float128 b = int64_to_float128(123);
float128 c = float128_mul(a, b);
int32_t c_int = float128_to_int32(c);
printf("123 * 123 = %d (expected %d)\n", c_int, 123 * 123);
printf("%f\n", a);
return 0;
}