renamed some defs

db4
Rex Ford 2008-08-02 13:57:17 -04:00
parent fb9f879aa6
commit 5ddb166caa
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
! Copyright © 2008 Reginald Keith Ford II ! Copyright © 2008 Reginald Keith Ford II
! Newton's Method of approximating roots ! Newton's Method of approximating roots
USING: kernel math math.derivatives ; USING: kernel math math.derivatives ;
@ -6,6 +6,6 @@ IN: math.newtons-method
<PRIVATE <PRIVATE
: newton-step ( x function -- x2 ) dupd [ call ] [ derivative ] 2bi / - ; : newton-step ( x function -- x2 ) dupd [ call ] [ derivative ] 2bi / - ;
: newton-precision ( -- n ) 7 ; : newton-precision ( -- n ) 13 ;
PRIVATE> PRIVATE>
: newton-method ( guess function -- x ) newton-precision [ [ newton-step ] keep ] times drop ; : newtons-method ( guess function -- x ) newton-precision [ [ newton-step ] keep ] times drop ;