From: Lolevelint
Subject: deviate the derivate
Date: 
Message-ID: <19981025090617.19500.00000962@ng-fb1.aol.com>
I have made several attempts at writting a function to take math formulae to
lisp formulae as in the examples below.  The little *gray cells* keep running
run out of neural transmittors before the job gets completed.  I read one of
the news groups submissions *that we should contribute not whin*.....will
galdly contritube $$$ as this task seems as *task to far* for me.
 
; Example of a nearly impossible problem.
; The true solution is: x1=1/3   x2=0   x3=1e-12
; but there are many "solutions" with small residuals.

; x1^2 + 2*x2 - exp(x2) + x3 = 1e-12 - 8/9
; x1*x2 + exp(-x2) + x1*x3 = 1 + 1e-12/3
; x1^3 + cos(x2) - x3 = 1/27 - 1e-12 + 1

 ;;;;(x1^2 + 2*x2 - exp(x2) + x3) - (1e-12 - 8/9) = 0
 (- (+ (- (+ (^ x1 2) (* 2 x2)) exp(x2)) x3) (- (- 1e 12) (/ 8 9)))

 ;;;;(x1*x2 + exp(-x2) + x1*x3) - (1 + 1e-12/3) = 0
 (- (+ (+ (* x1 x2) exp(-x2)) (*x1 x3)) (- (+ 1 1e) (/12 3)))

 ;;;;(x1^3 + cos(x2) - x3) - (1/27 - 1e-12 + 1) = 0
(- (- (+ (^ x1 3) cos(x2))  x3)  (- (/ 1 27) (+ (- 1e 12) 1)))

;;;x1 := .5
(setq x1 0.5)
;;;x2 := 0
(setq x2 0)
;;;x3 := 0
(setq x3 0)

From: Lolevelint
Subject: Re: deviate the derivate
Date: 
Message-ID: <19981025125523.24145.00001128@ng93.aol.com>
I am Sorry I should have completely resolved the equation and functions for
clearity. Thus:
; Example of a nearly impossible problem.
; The true solution is: x1=1/3   x2=0   x3=1e-12
; but there are many "solutions" with small residuals.

; x1^2 + 2*x2 - exp(x2) + x3 = 1e-12 - 8/9
; x1*x2 + exp(-x2) + x1*x3 = 1 + 1e-12/3
; x1^3 + cos(x2) - x3 = 1/27 - 1e-12 + 1
;;;x1 := .5
(setq x1 0.5)
;;;x2 := 0
(setq x2 0)
;;;x3 := 0
(setq x3 0)
;;;e := 2.71828
(setq e 2.71828)


 ;;;;(x1^2 + 2*x2 - exp(x2) + x3) - (1e-12 - 8/9) = 0
(- (+ (- (+ (expt x1 2) (* 2 x2)) (exp x2)) x3) (- (- (e 1) 12) (/ 8 9)))

 ;;;;(x1*x2 + exp(-x2) + x1*x3) - (1 + 1e-12/3) = 0
; (- (+ (+ (* x1 x2) (exp -x2)) (* x1 x3)) (- (+ 1 e) (/12 3)))

 ;;;;(x1^3 + cos(x2) - x3) - (1/27 - 1e-12 + 1) = 0
;(- (- (+ (expt x1 3) (cos x2))  x3)  (- (/ 1 27) (+ (- e 12) 1)))



From: Barry Margolin
Subject: Re: deviate the derivate
Date: 
Message-ID: <PGJY1.85$VI.1302270@burlma1-snr1.gtei.net>
In article <·····························@ng-fb1.aol.com>,
Lolevelint <··········@aol.com> wrote:
>I have made several attempts at writting a function to take math formulae to
>lisp formulae as in the examples below.  The little *gray cells* keep running
>run out of neural transmittors before the job gets completed.  I read one of
>the news groups submissions *that we should contribute not whin*.....will
>galdly contritube $$$ as this task seems as *task to far* for me.

There are a number of infix-to-prefix packages which you should be able to
find in the Lisp archives.  The FAQ has a pointer to its location.

-- 
Barry Margolin, ······@bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
From: Lolevelint
Subject: Re: deviate the derivate
Date: 
Message-ID: <19981025144326.09106.00000941@ng114.aol.com>
Thank you Sir.  I found the mother load.  I had to give the function  a
_little_ adjustment (tear it to pieces) for my needs but I am like the
*venerable* monkey...monkey see monkey do.  There a two classes of objects in
the world (imo) worthy of effort  1). those i can tear up 2).  those i can eat.
 If you can't eat it, tear it up.
Curwin