Looks like a bug to me, so I filed https://github.com/golang/go/issues/56023

Thanks for reporting it.

-rob


On Tue, Oct 4, 2022 at 1:18 PM Jonathan Pearson <cello...@gmail.com> wrote:

> I expected int64(math.Inf(+1)) == math.MaxInt64, but it does not.
>
> In fact, these three values are equal:
> int64(math.Inf(+1))
> int64(math.Inf(-1))
> math.MinInt64
>
> This surprised me, and the language spec didn't clarify this specific
> behavior, so I wondered whether it was intentional. If so, why?
>
> ~Jonathan
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/3970aef1-8416-4102-bbd7-72033993e9b0n%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/3970aef1-8416-4102-bbd7-72033993e9b0n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOXNBZRouE9_6Yq6GBXxFUuYpidktPr8H9LQihxbW2S5wY1EDg%40mail.gmail.com.

Reply via email to