more minor fixes
parent
fa2e448e38
commit
4fc9860c0a
|
@ -8,6 +8,7 @@ backtrack math.ranges locals fry memoize macros assocs ;
|
||||||
|
|
||||||
IN: 24-game
|
IN: 24-game
|
||||||
|
|
||||||
|
: nop ;
|
||||||
: do-something ( a b -- c ) { + - * } amb-execute ;
|
: do-something ( a b -- c ) { + - * } amb-execute ;
|
||||||
: maybe-swap ( a b -- a b ) { nop swap } amb-execute ;
|
: maybe-swap ( a b -- a b ) { nop swap } amb-execute ;
|
||||||
: some-rots ( a b c -- a b c )
|
: some-rots ( a b c -- a b c )
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
! Copyright © 2008 Reginald Keith Ford II
|
! Copyright © 2008 Reginald Keith Ford II
|
||||||
! Tool for computing the derivative of a function at a point
|
! Tool for computing the derivative of a function at a point
|
||||||
USING: kernel math math.points math.function-tools ;
|
USING: kernel math math.points math.function-tools ;
|
||||||
IN: derivatives
|
IN: math.derivatives
|
||||||
|
|
||||||
: small-amount ( -- n ) 1.0e-12 ;
|
: small-amount ( -- n ) 1.0e-12 ;
|
||||||
: near ( x -- y ) small-amount + ;
|
: near ( x -- y ) small-amount + ;
|
||||||
: derivative ( x function -- m ) 2dup [ near ] dip [ eval ] 2bi@ slope ;
|
: derivative ( x function -- m ) 2dup [ near ] dip [ eval ] 2bi@ slope ;
|
||||||
|
: derivative-func ( function -- function ) [ derivative ] curry ;
|
|
@ -1,5 +1,5 @@
|
||||||
! Copyright © 2008 Reginald Keith Ford II
|
! Copyright © 2008 Reginald Keith Ford II
|
||||||
! Tools for quickly comparing and evaluating mathematical Factor functions
|
! Tools for quickly comparing, transforming, and evaluating mathematical Factor functions
|
||||||
|
|
||||||
USING: kernel math arrays ;
|
USING: kernel math arrays ;
|
||||||
IN: math.function-tools
|
IN: math.function-tools
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! 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 derivatives ;
|
USING: kernel math math.derivatives ;
|
||||||
IN: newtons-method
|
IN: newtons-method
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
Loading…
Reference in New Issue