1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

math: fix typo in factorial.v (#17322)

This commit is contained in:
Ikko Eltociear Ashimine 2023-02-16 02:57:37 +09:00 committed by GitHub
parent 5d4c9dc9fc
commit 2382549df3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@ module math
// factorial calculates the factorial of the provided value.
pub fn factorial(n f64) f64 {
// For a large postive argument (n >= factorials_table.len) return max_f64
// For a large positive argument (n >= factorials_table.len) return max_f64
if n >= factorials_table.len {
return max_f64
}
@ -15,7 +15,7 @@ pub fn factorial(n f64) f64 {
// log_factorial calculates the log-factorial of the provided value.
pub fn log_factorial(n f64) f64 {
// For a large postive argument (n < 0) return max_f64
// For a large positive argument (n < 0) return max_f64
if n < 0 {
return -max_f64
}