Skip to content
Snippets Groups Projects
Commit ce7a46fa authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Now sets the floatingpoint rounding mode to round to nearest.

Rev: src/modules/_math/math.c:1.28
parent 9ef1ee19
Branches
Tags
No related merge requests found
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <floatingpoint.h> #include <floatingpoint.h>
#endif #endif
RCSID("$Id: math.c,v 1.27 1999/12/11 19:30:41 grubba Exp $"); RCSID("$Id: math.c,v 1.28 2000/03/28 19:37:23 grubba Exp $");
#ifndef M_PI #ifndef M_PI
#define M_PI 3.1415926535897932384626433832795080 #define M_PI 3.1415926535897932384626433832795080
...@@ -288,6 +288,12 @@ void pike_module_init(void) ...@@ -288,6 +288,12 @@ void pike_module_init(void)
#ifdef HAVE_FPSETMASK #ifdef HAVE_FPSETMASK
fpsetmask(0); fpsetmask(0);
#endif #endif
#ifdef HAVE_FPSETROUND
#ifndef FP_RN
#define FP_RN 0
#endif
fpsetround(FP_RN);
#endif /* HAVE_FPSETROUND */
/* function(float:float) */ /* function(float:float) */
ADD_EFUN("sin",f_sin,tFunc(tFlt,tFlt),0); ADD_EFUN("sin",f_sin,tFunc(tFlt,tFlt),0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment