I think this example might fail on 32 bit systems.
https://github.com/JuliaLang/julia/blob/df1ee8cb185bbf75999384ce882a89cd9ca8d3fd/base/math.jl#L533
This is also an instance, right? https://github.com/JuliaLang/julia/blob/df1ee8cb185bbf75999384ce882a89cd9ca8d3fd/base/libc.jl#L387
For reference, I looked for examples for example in
grep -r --include="*.jl" [^\.][0-9]\^[0-9] . | less
... and I did this to convince you to reopen #5573 ;-) This problem permeates the entire ecosystem, https://pkg.julialang.org/docs/search?q=2%5C%5E%5B3-9%5D%5B0-9%5D%7C%5B%5E%5C.%5D%5B0-9%5D%7B2,%7D%5C%5E%5B0-9%5D%7B2,%7D
As a somewhat broader point, maybe we should run doctests on both a 64- and 32-bit platform?
Also, what would you like the behavior here to be?
As a somewhat broader point, maybe we should run doctests on both a 64- and 32-bit platform?
A somewhat minimal requirement is to make passing 32-bit doctests mandatory for the release candidates?
@staticfloat, could we just add an extra CI build for 32-bit doctests?
Also, what would you like the behavior here to be?
I think I would like ^
with literal arguments use a checked version of power_by_squaring
(which would make sense if there is no performance penalty due to constant propagation), but I cannot say if this realistic.
Lots of things print differently on 32bit so running the doctests there are not that easy.
Even though the proximate issue is dealt with perhaps I should leave this open for a bit more discussion of the general problem.
There are a very large number of doctest errors when run on a 32bit machine, because many of the outputs expect e.g. ::Array{Int64,1}
, when they instead get ::Array{Int32,1}
. I'm not sure it's worth our time to try and generify this, although perhaps it is! I can create a doctest_linux32
builder trivially; but it will just add to the noise unless we go through and change a large proportion of the current docstrings.
I'm not sure it's worth our time to try and generify this, although perhaps it is!
It's not.
Most helpful comment
It's not.