aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime.c
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2008-07-08 17:26:10 -0700
committerRob Pike <r@golang.org>2008-07-08 17:26:10 -0700
commit41b9617be46ba0faab73a368fdc8939a615f7214 (patch)
tree4d53e7f7d9c474e4796c90ea6685ccdf4e8ee6ff /src/runtime/runtime.c
parent4528854308cfe80fb840aa7a210495e31b16b000 (diff)
downloadgo-41b9617be46ba0faab73a368fdc8939a615f7214.tar.xz
fix ldexp, frexp, and make math package compile and test correctly
SVN=126423
Diffstat (limited to 'src/runtime/runtime.c')
-rw-r--r--src/runtime/runtime.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/runtime/runtime.c b/src/runtime/runtime.c
index 9d79fa5312..ea6925d100 100644
--- a/src/runtime/runtime.c
+++ b/src/runtime/runtime.c
@@ -402,15 +402,15 @@ modf(float64 d, float64 *ip)
* Keep the top 11+e bits; clear the rest.
*/
if(e <= 64-11)
- x &= ~((uint64)1 << (64-11-e))-1;
+ x &= ~(((uint64)1 << (64LL-11LL-e))-1);
dd = *(float64*)&x;
*ip = dd;
return d - dd;
}
-// func frexp(float64) (int32, float64); // break fp into exp,fract
+// func frexp(float64) (float64, int32); // break fp into exp,fract
void
-sys·frexp(float64 din, int32 iou, float64 dou)
+sys·frexp(float64 din, float64 dou, int32 iou)
{
dou = frexp(din, &iou);
FLUSH(&dou);
@@ -426,10 +426,10 @@ sys·ldexp(float64 din, int32 ein, float64 dou)
//func modf(float64) (float64, float64); // break fp into double+double
float64
-sys·modf(float64 din, float64 dou1, float64 dou2)
+sys·modf(float64 din, float64 integer, float64 fraction)
{
- dou1 = modf(din, &dou2);
- FLUSH(&dou2);
+ fraction = modf(din, &integer);
+ FLUSH(&fraction);
}
//func isinf(float64, int32 sign) bool; // test for infinity