Fix incorrect usage of /f

slava 2006-11-10 23:16:56 +00:00
parent 31fdfea197
commit ceb815dc8b
2 changed files with 10 additions and 4 deletions

View File

@ -31,7 +31,7 @@ USING: kernel math math-internals ;
: cosech ( x -- y ) sinh recip ; inline
: tan ( x -- y ) dup sin swap cos /f ; inline
: tanh ( x -- y ) dup sinh swap cosh /f ; inline
: cot ( x -- y ) dup cos swap sin /f ; inline
: coth ( x -- y ) dup cosh swap sinh /f ; inline
: tan ( x -- y ) dup sin swap cos / ; inline
: tanh ( x -- y ) dup sinh swap cosh / ; inline
: cot ( x -- y ) dup cos swap sin / ; inline
: coth ( x -- y ) dup cosh swap sinh / ; inline

View File

@ -59,3 +59,9 @@ USE: test
[ 1 0 ] [ 1 >polar ] unit-test
[ 1 ] [ -1 >polar drop ] unit-test
[ t ] [ -1 >polar nip 3.14 3.15 between? ] unit-test
! I fucked something up
[ ] [ C{ 1 4 } tanh drop ] unit-test
[ ] [ C{ 1 4 } tan drop ] unit-test
[ ] [ C{ 1 4 } coth drop ] unit-test
[ ] [ C{ 1 4 } cot drop ] unit-test