Hi Konrad, Konrad Hinsen <konrad.hin...@fastmail.net> skribis:
> Indeed. The details are here: > > https://gitlab.inria.fr/guix-hpc/guix-past/-/issues/1 Oooh, thank you! It looks like an “interesting” bug, one of those that can help make the case for precise software environment control. :-) bonfacemuny...@gmail.com (Bonface M. K.) skribis: > That's strange. To get the right results, you'd have to do a `2L ** 64`. > When I tried `2 ** 63` I got `-9223372036854775808`. There's also an > overflow error. Here's a snippet of what fails from > Python-2.4.6/Lib/test: > > ``` > # If this fails, probably using a strict IEEE-754 conforming libm, and x > # is +Inf afterwards. But Python wants overflows detected by default. > try: > x = math.exp(1000000000) > except OverflowError: > pass > else: > raise TestFailed("overflowing exp() didn't trigger OverflowError") > ``` > > Maybe there's an overflow somewhere and we'd have to tweak libm? I'm > speculating though. I'd have to investigate this later. Uh, weird! We could check whether building Python with ‘-fwrapv’ helps. See also <https://lwn.net/Articles/511259/>. Ludo’.