renamed some defs
parent
fb9f879aa6
commit
5ddb166caa
|
|
@ -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 ;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue