[Dojo-checkins] [dojo] #10374: dojox.math.factorial incorrectly returning NaN for non-integers

dojo trac at dojotoolkit.org
Sat Nov 21 23:17:46 EST 2009


#10374: dojox.math.factorial incorrectly returning NaN for non-integers
----------------------+-----------------------------------------------------
 Reporter:  doughays  |        Owner:  doughays
     Type:  defect    |       Status:  new     
 Priority:  normal    |    Milestone:  1.5     
Component:  Dojox     |      Version:  1.4.0b  
 Severity:  normal    |   Resolution:          
 Keywords:            |  
----------------------+-----------------------------------------------------

Comment(by elazutkin):

 Try not to overdo it: one can always complain that it doesn't work for
 negative and complex numbers, quaternions, and octonions too --- there are
 generalizations for these and other cases. ;-)

 It reminds me of my robotics prof, who asked us to write a solver for a
 trivial quadratic polynomial, and embarrassed students by pointing out
 that their solution doesn't work for complex numbers, doesn't show that
 there are no solutions ({{{a == 0, b == 0, c != 0}}}), doesn't detect
 degenerated linear cases ({{{a == 0, b != 0}}}, or {{{a != 0, b == 0}}}),
 and in some cases any values are valid solutions ({{{a == 0, b == 0, c ==
 0}}}).

-- 
Ticket URL: <http://trac.dojotoolkit.org/ticket/10374#comment:1>
dojo <http://dojotoolkit.org/>
The Dojo UI Toolkit


More information about the Dojo-checkins mailing list