-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
What did you do?
see https://play.golang.org/p/IviJWtsbRoW
package main
import (
"fmt"
"math/big"
)
func main() {
var a, _, _ = big.ParseFloat("0x.8p-2147483648", 0, 4, big.ToNearestEven)
var b, _, _ = big.ParseFloat("0x.8p-2147483647", 0, 4, big.ToNearestEven)
fmt.Println("a = (x format)", a.Text('x', -1), "(p format)", a.Text('p', -1))
fmt.Println("b = (x format)", b.Text('x', -1), "(p format)", b.Text('p', -1))
}What did you expect to see?
a = (x format) 0x1p-2147483649 (p format) 0x.8p-2147483648
b = (x format) 0x1p-2147483648 (p format) 0x.8p-2147483647
What did you see instead?
a = (x format) 0x1p+2147483647 (p format) 0x.8p-2147483648
b = (x format) 0x1p-2147483648 (p format) 0x.8p-2147483647
Please note the wrong +2147483647 exponent for a.Text('x', -1).
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.