octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #50330] factorial(250) returns InF


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #50330] factorial(250) returns InF
Date: Thu, 16 Feb 2017 15:37:27 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0

Update of bug #50330 (project octave):

                  Status:                    None => Invalid                
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #2:

>From https://www.mathworks.com/help/matlab/ref/factorial.html

> For single and double, all values larger than the maximum value are returned
as Inf

So Octave is behaving correctly. Any factorial(n) where n >= 171 should return
Inf.

The OP may be interested in the symbolic package for Octave. Compare:


>> factorial (250)
ans = Inf
>> factorial (sym (250))
ans = (sym)

 
3232856260909107732320814552024368470994843717673780666747942427112823747555111209488817915371028199450928507353189432926730931712808990822791030279071281921676527240189264733218041186261006832925365133678939089569935713530175040513178760077247933065402339006164825552248819436572586057399222641254832982204849137721776650641276858807153128978777672951913990844377478702589172973255150283241787320658188482062478582659808848825548800000000000000000000000000000000000000000000000000000000000000



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?50330>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]