If I want to get the result, how can I work around the barrier?
here’s some hacky code which returns a 2-element array
the first number is the significant digits and the second number is
the exponent:
def calc(n)
exp=0
val = (2 ** n)
while val3 > 1e290.to_i
val/=10
exp+=1
end
val =(5**0.5)
unless val.to_s.grep(/(.)e+(.)/).empty?
val = $1.to_f
exp+=$2.to_i
end
[val, exp]
end
p calc 1
p calc 10
p calc 100
p calc 1000
p calc 10000