speedcrunch / SpeedCrunch

A fast, high-precision and powerful cross-platform desktop calculator.
http://speedcrunch.org
265 stars 38 forks source link

Does Not support Factorial #86

Closed heldercorreia closed 8 years ago

heldercorreia commented 8 years ago

Originally reported on Google Code with ID 24

What steps will reproduce the problem?
1.  ender 3! 

What is the expected output? What do you see instead?

the result of 3! should be 3*2*1 = 6

What version of the product are you using? On what operating system?

.7 

Please provide any additional information below.

Reported by dennis.schaaf on 2007-02-13 08:54:21

heldercorreia commented 8 years ago
I'm missing that function, too. It is widely used in statistics, but crops up in
other areas as well. And, just to catch up with the default MS Windows calculator,
it
would be nice to have the factorial for non-integers on my favorite calculator as well.

Given the usual definition n! = n*(n-1)*...2*1, something like "0.37!" looks odd on
first sight. But mathematicians found out, that factorials can be interpolated in a
"nice and decent" way. The MS calculator returns these "nice" values.

Should you decide to implement this function, feel free to contact me. I am able to
help out with the mathematics. For instance, 0.37! is "roughly"
0.889313507429101701928688000953917586655876997735163541862664701290421764983186341346,
a value that bc evaluated within 0.15 seconds, after I fed it with my factorial script.

Reported by ookami1@gmx.de on 2007-04-16 01:14:56

heldercorreia commented 8 years ago
The svn version already has preliminary support for factorial, but it can't compute
0.37! yet.

Would you kindly share your bc script to calculate the factorial?

Reported by ariya.hidayat on 2007-04-16 08:47:39

heldercorreia commented 8 years ago
OK, who shall I send the file to?

Wolf

Reported by ookami1@gmx.de on 2007-04-17 23:52:55

heldercorreia commented 8 years ago
Please send it to me: ariya@kde.org

Thank you in advance !

Reported by ariya.hidayat on 2007-04-18 14:53:29

heldercorreia commented 8 years ago

Reported by helder.pereira.correia on 2007-05-11 23:10:24

heldercorreia commented 8 years ago
Maybe we should consider expressions like "sin(3)!" to be recognized. Or maybe just
the ones like "(sin(3))!".

Reported by helder.pereira.correia on 2007-05-11 23:14:32

heldercorreia commented 8 years ago

Reported by helder.pereira.correia on 2007-07-02 08:40:13