Weird behaviour/bug with pi and rational exponents
When I type this:
print numerical_approx((4/pi())^(2/1))
print numerical_approx((4/3.14159265358979)^(2/1))
I get
sage: 3.90303389783585e2585827972
1.62113893827741
(note the letter "e" in the 1st line)
This happens on my notebook, on the COCALC server there is a crash.
Has anyone else seen this ? What is the problem there ?
I can reproduce this in the Sage REPL of Python3-based Sage 8.8.beta3 on macOS too.
Minimal example:
(4/pi)^2
and(4/I)^(2/1)
work fine but(4/pi)^(2/1)
and(4/e)^(2/1)
misbehave, going into some intense long-lasting computation. Interrupting this long computation givesEven more minimal
(2/pi)^(2/1)
:-) This looks like a bug in Pynac/Ginac that is called for constructing the string representation