Skip to content

math: Pow(x,y) fails for large values of y #7394

@gopherbot

Description

@gopherbot

by nicolas.riesch:

What steps will reproduce the problem?

see http://play.golang.org/p/rcVquN_0xc


What is the expected output?

for x=2.0 and y>=2147483648.0, math.Pow(x,y) should return +Inf

What do you see instead?

It returns 0.0


Please provide any additional information below.

On my 64bits computer, "Linux VBox-Mint15-64bits 3.8.0-19-generic #29-Ubuntu SMP
Wed Apr 17 18:16:28 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux"
with "go version go1.2rc5 linux/amd64", I have a similar problem :

for x = 2.0 and y = 9223372036854775808.0, math.Pow(x,y) should return +Inf
but it returns 0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions