September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
3
Task/Factorial/Gnuplot/factorial-1.gnuplot
Normal file
3
Task/Factorial/Gnuplot/factorial-1.gnuplot
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
set xrange [0:4.95]
|
||||
set key left
|
||||
plot int(x)!
|
||||
11
Task/Factorial/Gnuplot/factorial-2.gnuplot
Normal file
11
Task/Factorial/Gnuplot/factorial-2.gnuplot
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# Using int(n) allows non-integer "n" inputs with the factorial
|
||||
# calculated on int(n) in that case.
|
||||
# Arranging the condition as "n>=2" avoids infinite recursion if
|
||||
# n==NaN, since any comparison involving NaN is false. Could change
|
||||
# "1" to an expression like "n*0+1" to propagate a NaN input to the
|
||||
# output too, if desired.
|
||||
#
|
||||
factorial(n) = (n >= 2 ? int(n)*factorial(n-1) : 1)
|
||||
set xrange [0:4.95]
|
||||
set key left
|
||||
plot factorial(x)
|
||||
Loading…
Add table
Add a link
Reference in a new issue