more minor fixes

db4
Rex Ford 2008-07-22 20:45:13 -04:00
parent fa2e448e38
commit 4fc9860c0a
4 changed files with 7 additions and 5 deletions

View File

@ -8,6 +8,7 @@ backtrack math.ranges locals fry memoize macros assocs ;
IN: 24-game
: nop ;
: do-something ( a b -- c ) { + - * } amb-execute ;
: maybe-swap ( a b -- a b ) { nop swap } amb-execute ;
: some-rots ( a b c -- a b c )

View File

@ -1,8 +1,9 @@
! Copyright © 2008 Reginald Keith Ford II
! Tool for computing the derivative of a function at a point
USING: kernel math math.points math.function-tools ;
IN: derivatives
IN: math.derivatives
: small-amount ( -- n ) 1.0e-12 ;
: near ( x -- y ) small-amount + ;
: derivative ( x function -- m ) 2dup [ near ] dip [ eval ] 2bi@ slope ;
: derivative-func ( function -- function ) [ derivative ] curry ;

View File

@ -1,5 +1,5 @@
! 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 ;
IN: math.function-tools

View File

@ -1,7 +1,7 @@
! Copyright © 2008 Reginald Keith Ford II
! Newton's Method of approximating roots
USING: kernel math math.derivatives derivatives ;
USING: kernel math math.derivatives ;
IN: newtons-method
<PRIVATE