On Sun, Jul 30, 2017 at 10:40 AM, <mhipo1...@gmail.com> wrote: > > I just ran this code on my pc: > > package main > > import ( > "fmt" > "math" > ) > > func main() { > const ali = 4e20 > fmt.Println(math.Sin(ali)) > } > > > and got this result: > > 1.3471173831553043e+258 > > Why Sin result goes more than 1 ???????????????????
It's a bug. Consider filing a bug. The current implementation of math.Sin says "Results may be meaningless for x > 2**49 = 5.6e14." It would be nice to fix that if it's not too expensive. Of course the results of Sin are fairly meaningless for such large values in any case, as the values will lack precision, but we may as well try to at least get a valid range. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.