Re: literal 9223372036854775808 is negative

new topic     » goto parent     » topic index » view thread      » older message » newer message
jimcbrown said...

Wonder what Phix does differently, and if that's an easy thing to copy over into OE.

See https://openeuphoria.org/forum/m/137533.wc

Incidentally, #8000000000000000 probably works despite technically having the same bug, except that (unlike *10) *16 never introduces any error, and while #80..0 + '0' might be wrong that is perfectly cancelled out with the exact same error by -'0', which is not necessarily true for +'2' followed by -'0' (at such close proximity to the hardware limits), or more likely (unlike decimal) you've not going to do that anyway because of the whole 0-9/a-f thing.

PS You're probably right about one thing, I seem to recall that bug needed fixing in about 4 or 5 places in Phix (fewer than first feared, just the one in the compiler itself, but others in things like to_number).

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu