Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merge pull request #504 from cptobvious/math
Nearly complete Math module
- Loading branch information
Showing
with
278 additions
and 140 deletions.
- +0 −7 spec/tags/core/math/acos_tags.txt
- +0 −6 spec/tags/core/math/acosh_tags.txt
- +0 −6 spec/tags/core/math/asin_tags.txt
- +0 −6 spec/tags/core/math/asinh_tags.txt
- +0 −9 spec/tags/core/math/atan2_tags.txt
- +0 −6 spec/tags/core/math/atan_tags.txt
- +0 −4 spec/tags/core/math/atanh_tags.txt
- +0 −6 spec/tags/core/math/cos_tags.txt
- +0 −6 spec/tags/core/math/cosh_tags.txt
- +0 −1 spec/tags/core/math/exp_tags.txt
- +0 −5 spec/tags/core/math/frexp_tags.txt
- +0 −6 spec/tags/core/math/hypot_tags.txt
- +0 −9 spec/tags/core/math/ldexp_tags.txt
- +0 −6 spec/tags/core/math/log10_tags.txt
- +0 −6 spec/tags/core/math/log2_tags.txt
- +0 −1 spec/tags/core/math/log_tags.txt
- +0 −1 spec/tags/core/math/sin_tags.txt
- +0 −6 spec/tags/core/math/sinh_tags.txt
- +0 −1 spec/tags/core/math/sqrt_tags.txt
- +0 −7 spec/tags/core/math/tan_tags.txt
- +0 −6 spec/tags/core/math/tanh_tags.txt
- +136 −15 tests/modules/test_math.py
- +142 −14 topaz/modules/math.py
@@ -1,10 +1,3 @@ | ||
fails:Math.acos returns a float | ||
fails:Math.acos returns the arccosine of the argument | ||
fails:Math.acos raises an Errno::EDOM if the argument is greater than 1.0 | ||
fails:Math.acos raises an Errno::EDOM if the argument is less than -1.0 | ||
fails:Math.acos raises a TypeError if the string argument cannot be coerced with Float() | ||
fails:Math.acos returns NaN given NaN | ||
fails:Math.acos raises an TypeError if the argument cannot be coerced with Float() | ||
fails:Math.acos raises a TypeError if the argument is nil | ||
fails:Math.acos accepts any argument that can be coerced with Float() | ||
fails:Math#acos is accessible as a private instance method |
@@ -1,8 +1,2 @@ | ||
fails:Math.acosh returns a float | ||
fails:Math.acosh returns the principle value of the inverse hyperbolic cosine of the argument | ||
fails:Math.acosh it raises Errno::EDOM if the passed argument is less than -1.0 or greater than 1.0 | ||
fails:Math.acosh raises a TypeError if the argument cannot be coerced with Float() | ||
fails:Math.acosh returns NaN given NaN | ||
fails:Math.acosh raises a TypeError if the argument is nil | ||
fails:Math.acosh accepts any argument that can be coerced with Float() | ||
fails:Math#acosh is accessible as a private instance method |
@@ -1,9 +1,3 @@ | ||
fails:Math.asin return a float | ||
fails:Math.asin returns the arcsine of the argument | ||
fails:Math.asin raises an Errno::EDOM if the argument is greater than 1.0 | ||
fails:Math.asin raises an Errno::EDOM if the argument is less than -1.0 | ||
fails:Math.asin raises a TypeError if the argument cannot be coerced with Float() | ||
fails:Math.asin returns NaN given NaN | ||
fails:Math.asin raises a TypeError if the argument is nil | ||
fails:Math.asin accepts any argument that can be coerced with Float() | ||
fails:Math#asin is accessible as a private instance method |
@@ -1,7 +1 @@ | ||
fails:Math.asinh returns a float | ||
fails:Math.asinh returns the inverse hyperbolic sin of the argument | ||
fails:Math.asinh raises a TypeError if the argument cannot be coerced with Float() | ||
fails:Math.asinh returns NaN given NaN | ||
fails:Math.asinh raises a TypeError if the argument is nil | ||
fails:Math.asinh accepts any argument that can be coerced with Float() | ||
fails:Math#asinh is accessible as a private instance method |
@@ -1,10 +1 @@ | ||
fails:Math.atan2 returns a float | ||
fails:Math.atan2 returns the arc tangent of y, x | ||
fails:Math.atan2 raises an TypeError if the argument cannot be coerced with Float() | ||
fails:Math.atan2 raises a TypeError if the argument is nil | ||
fails:Math.atan2 accepts any argument that can be coerced with Float() | ||
fails:Math.atan2 returns positive zero when passed 0.0, 0.0 | ||
fails:Math.atan2 returns negative zero when passed -0.0, 0.0 | ||
fails:Math.atan2 returns Pi when passed 0.0, -0.0 | ||
fails:Math.atan2 returns -Pi when passed -0.0, -0.0 | ||
fails:Math#atan2 is accessible as a private instance method |
@@ -1,7 +1 @@ | ||
fails:Math.atan returns a float | ||
fails:Math.atan return the arctangent of the argument | ||
fails:Math.atan raises a TypeError if the argument cannot be coerced with Float() | ||
fails:Math.atan returns NaN given NaN | ||
fails:Math.atan raises a TypeError if the argument is nil | ||
fails:Math.atan accepts any argument that can be coerced with Float() | ||
fails:Math#atan is accessible as a private instance method |
@@ -1,9 +1,5 @@ | ||
fails:Math.atanh returns a float | ||
fails:Math.atanh returns the inverse hyperbolic tangent of the argument | ||
fails:Math.atanh raises an Math::DomainError for arguments greater than 1.0 | ||
fails:Math.atanh raises an Math::DomainError for arguments less than -1.0 | ||
fails:Math#atanh is a private instance method | ||
fails:Math#atanh returns a float | ||
fails:Math#atanh returns the inverse hyperbolic tangent of the argument | ||
fails:Math#atanh raises an Math::DomainError for arguments greater than 1.0 | ||
fails:Math#atanh raises an Math::DomainError for arguments less than -1.0 |
@@ -1,7 +1 @@ | ||
fails:Math.cos returns a float | ||
fails:Math.cos returns the cosine of the argument expressed in radians | ||
fails:Math.cos raises a TypeError unless the argument is Numeric and has #to_f | ||
fails:Math.cos returns NaN given NaN | ||
fails:Math.cos raises a TypeError if the argument is nil | ||
fails:Math.cos coerces its argument with #to_f | ||
fails:Math#cos is accessible as a private instance method |
@@ -1,7 +1 @@ | ||
fails:Math.cosh returns a float | ||
fails:Math.cosh returns the hyperbolic cosine of the argument | ||
fails:Math.cosh raises a TypeError if the argument cannot be coerced with Float() | ||
fails:Math.cosh returns NaN given NaN | ||
fails:Math.cosh raises a TypeError if the argument is nil | ||
fails:Math.cosh accepts any argument that can be coerced with Float() | ||
fails:Math#cosh is accessible as a private instance method |
@@ -1,2 +1 @@ | ||
fails:Math.exp raises a TypeError if the argument cannot be coerced with Float() | ||
fails:Math.exp returns NaN given NaN |
@@ -1,6 +1 @@ | ||
fails:Math.frexp returns the normalized fraction and exponent | ||
fails:Math.frexp raises a TypeError if the argument cannot be coerced with Float() | ||
fails:Math.frexp returns NaN given NaN | ||
fails:Math.frexp raises a TypeError if the argument is nil | ||
fails:Math.frexp accepts any argument that can be coerced with Float() | ||
fails:Math#frexp is accessible as a private instance method |
@@ -1,7 +1 @@ | ||
fails:Math.hypot returns a float | ||
fails:Math.hypot returns the length of the hypotenuse of a right triangle with legs given by the arguments | ||
fails:Math.hypot raises a TypeError if the argument cannot be coerced with Float() | ||
fails:Math.hypot returns NaN given NaN | ||
fails:Math.hypot raises a ArgumentError if the argument is nil | ||
fails:Math.hypot accepts any argument that can be coerced with Float() | ||
fails:Math#hypot is accessible as a private instance method |
@@ -1,11 +1,2 @@ | ||
fails:Math.ldexp returns a float | ||
fails:Math.ldexp returns the argument multiplied by 2**n | ||
fails:Math.ldexp raises a TypeError if the first argument cannot be coerced with Float() | ||
fails:Math.ldexp returns NaN given NaN | ||
fails:Math.ldexp raises RangeError if NaN is given as the second arg | ||
fails:Math.ldexp raises an TypeError if the second argument cannot be coerced with Integer() | ||
fails:Math.ldexp raises a TypeError if the first argument is nil | ||
fails:Math.ldexp raises a TypeError if the second argument is nil | ||
fails:Math.ldexp accepts any first argument that can be coerced with Float() | ||
fails:Math.ldexp accepts any second argument that can be coerced with Integer() | ||
fails:Math#ldexp is accessible as a private instance method |
@@ -1,8 +1,2 @@ | ||
fails:Math.log10 returns a float | ||
fails:Math.log10 return the base-10 logarithm of the argument | ||
fails:Math.log10 raises an Errno::EDOM if the argument is less than 0 | ||
fails:Math.log10 raises a TypeError if the argument cannot be coerced with Float() | ||
fails:Math.log10 returns NaN given NaN | ||
fails:Math.log10 raises a TypeError if the argument is nil | ||
fails:Math.log10 accepts any argument that can be coerced with Float() | ||
fails:Math#log10 is accessible as a private instance method |
@@ -1,8 +1,2 @@ | ||
fails:Math.log2 returns a float | ||
fails:Math.log2 returns the natural logarithm of the argument | ||
fails:Math.log2 raises an Errno::EDOM if the argument is less than 0 | ||
fails:Math.log2 raises an TypeError if the argument cannot be coerced with Float() | ||
fails:Math.log2 raises an TypeError if passed a numerical argument as a string | ||
fails:Math.log2 returns NaN given NaN | ||
fails:Math.log2 raises a TypeError if the argument is nil | ||
fails:Math.log2 accepts any argument that can be coerced with Float() |
@@ -1,2 +1 @@ | ||
fails:Math.sin raises a TypeError if the argument cannot be coerced with Float() | ||
fails:Math.sin returns NaN given NaN |
@@ -1,7 +1 @@ | ||
fails:Math.sinh returns a float | ||
fails:Math.sinh returns the hyperbolic sin of the argument | ||
fails:Math.sinh raises a TypeError if the argument cannot be coerced with Float() | ||
fails:Math.sinh returns NaN given NaN | ||
fails:Math.sinh raises a TypeError if the argument is nil | ||
fails:Math.sinh accepts any argument that can be coerced with Float() | ||
fails:Math#sinh is accessible as a private instance method |
@@ -1,2 +1 @@ | ||
fails:Math.sqrt raises a TypeError if the argument cannot be coerced with Float() | ||
fails:Math.sqrt returns NaN given NaN |
@@ -1,8 +1 @@ | ||
fails:Math.tan returns a float | ||
fails:Math.tan returns the tangent of the argument | ||
fails:Math.tan returns NaN if called with +-Infinitty | ||
fails:Math.tan raises a TypeError if the argument cannot be coerced with Float() | ||
fails:Math.tan returns NaN given NaN | ||
fails:Math.tan raises a TypeError if the argument is nil | ||
fails:Math.tan accepts any argument that can be coerced with Float() | ||
fails:Math#tan is accessible as a private instance method |
@@ -1,7 +1 @@ | ||
fails:Math.tanh returns a float | ||
fails:Math.tanh returns the hyperbolic tangent of the argument | ||
fails:Math.tanh raises an TypeError if the argument cannot be coerced with Float() | ||
fails:Math.tanh returns NaN given NaN | ||
fails:Math.tanh raises a TypeError if the argument is nil | ||
fails:Math.tanh accepts any argument that can be coerced with Float() | ||
fails:Math#tanh is accessible as a private instance method |
Oops, something went wrong.