mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
fix ldexp, frexp, and make math package compile and test correctly
SVN=126423
This commit is contained in:
parent
4528854308
commit
41b9617be4
9 changed files with 213 additions and 214 deletions
|
|
@ -358,7 +358,7 @@ func unpack(a double) (negative bool, exp int, num double) {
|
|||
}
|
||||
// find g,e such that a = g*10^e.
|
||||
// guess 10-exponent using 2-exponent, then fine tune.
|
||||
e2, g := sys.frexp(a);
|
||||
g, e2 := sys.frexp(a);
|
||||
e := int(e2 * .301029995663981);
|
||||
g = a * pow10(-e);
|
||||
for g < 1 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue