[julia-users] Re: Julia cannot compute factorial(21) while Octave can

2015-01-16 Thread Frank Kampas
factorial(BigInt(21)) works On Monday, January 12, 2015 at 10:10:06 PM UTC-5, Carlos Baptista wrote: I understand that factorial(21) is quite a large number and therefore an OverflowError is perfectly understandable. However, with Octave I can go up to factorial(170) (if I go higher I

Re: [julia-users] Re: Julia cannot compute factorial(21) while Octave can

2015-01-16 Thread Carlos Baptista
Thanks Frank :) , similar answers were already given On 16/01/2015, Frank Kampas fkam...@gmail.com wrote: factorial(BigInt(21)) works On Monday, January 12, 2015 at 10:10:06 PM UTC-5, Carlos Baptista wrote: I understand that factorial(21) is quite a large number and therefore an

[julia-users] Re: Julia cannot compute factorial(21) while Octave can

2015-01-15 Thread Ivar Nesje
Currently *OverflowError* doesn't have a message field, so to do this, you have to either let showerror https://github.com/JuliaLang/julia/blob/69a68305743a6b9a9409e7db69d955909e7006d0/base/replutil.jl#L114 check the backtrace to look for *factoria*l or add a text field, so that factorial can

[julia-users] Re: Julia cannot compute factorial(21) while Octave can

2015-01-14 Thread ggggg
Is there a way to provide a suggestion with the error? It currently says this, *julia **factorial(21)* *ERROR: OverflowError()* * in factorial_lookup at combinatorics.jl:27* * in factorial at combinatorics.jl:35* Maybe it would be more useful if it said *julia **factorial(21)* *ERROR:

[julia-users] Re: Julia cannot compute factorial(21) while Octave can

2015-01-14 Thread Viral Shah
I am guessing, that like Matlab, octave uses doubles to represent integers, and hence you can go a bit farther than with integers. That should be the same as factorial(21.0) in julia. Of course, you can also use BigInt and such, which has already been discussed here. -viral On Tuesday,