On Tue, Oct 4, 2022 at 4:18 AM Jonathan Pearson <cello...@gmail.com> wrote:
> I expected int64(math.Inf(+1)) == math.MaxInt64, but it does not. Quoting from https://go.dev/ref/spec#Conversions, section "Conversions between numeric types" """" In all non-constant conversions involving floating-point or complex values, if the result type cannot represent the value the conversion succeeds but the result value is implementation-dependent. """" AFAICT, this is working as intended. FTR, also in my experience, different targets produced different results for the same values the last time I ran into this issue some years ago. -- 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/CAA40n-XCahW0HryaUnzH2Por_R2bwhAzfy0aJckjP9NMFUhFQA%40mail.gmail.com.