ref: 0d415fd062b8bf01d105e9b433a90ae70d46bfcd
parent: 4540277f20b2e33fbd7caefc344ba652bfffb910
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Tue Jan 7 07:19:56 EST 2025
remove nan/inf values constants from mp tests
--- a/3rd/mp/test.c
+++ b/3rd/mp/test.c
@@ -1,10 +1,7 @@
#include <stdio.h>
#include "platform.h"
#include "mp.h"
-#include "ieee754.h"
-double D_PNAN, D_NNAN, D_PINF, D_NINF;
-
static int loops = 1;
static char gstr[16][8192];
static int istr = -1;
@@ -441,15 +438,6 @@
if(argc == 3 && strcmp(argv[1], "-n") == 0)
loops = atoi(argv[2]);
-
- D_PNAN = D_NNAN = strtod("+NaN", nil);
- D_PINF = D_NINF = strtod("+Inf", nil);
-
- union ieee754_double *d;
- d = (union ieee754_double *)&D_NNAN;
- d->ieee.negative = 1;
- d = (union ieee754_double *)&D_NINF;
- d->ieee.negative = 1;
srand(0);
mpsetminbits(2*Dbits);
--- a/3rd/mp/test/main.c
+++ b/3rd/mp/test/main.c
@@ -2,9 +2,7 @@
#include "mp.h"
#include "dat.h"
#include "fns.h"
-#include "ieee754.h"
-double D_PNAN, D_NNAN, D_PINF, D_NINF;
int anyfail = 0;
void
@@ -17,9 +15,6 @@
int
main()
{
- D_PNAN = D_NNAN = strtod("+NaN", nil);
- D_PINF = D_NINF = strtod("+Inf", nil);
-
convtests();
tests();
return anyfail;