Question: Odditity in CircleSum Procedure


I have a procedure which works. ⊕(a,b) gives annwer.   a ⊕ b also gives answer. That was a surprise, discovered from a typing mistake. If b is negative is needs to be enclosed in delay evulation quotes.

2  questions 

Can anyoone expllain this useful property? Any way around having to use delay evaluation quotes for negative numbers?

restart

NULL

``

NULL

`⊕` := proc (a, b) (a+b)/(1-a*b) end proc

proc (a, b) (a+b)/(1-a*b) end proc

(1)

`⊕`(1, 2)

-3

(2)

`⊕`(1, 2)

-3

(3)

`⊕`(`⊕`(`⊕`(1, 2), '-5'), 4)

-32/9

(4)

``

`⊕`(1, 1/2)

3

(5)

`⊕`(1/2, '-1')

-1/3

(6)

"(=)"

-1/3

(7)

`⊕`(0, h)

h

(8)

`⊕`(h, 0)

h

(9)

`⊕`(1/h, '-h')

(1/2)/h-(1/2)*h

(10)

`⊕`(1/h, -h)

(1/2)/h-(1/2)*h

(11)

-`⊕`(h, 1/h^2)

-(h+1/h^2)/(1-1/h)

(12)

"(=)"

(-h^3-1)/(h*(h-1))

(13)

NULL


 

Download Circle_Sum.mw

Please Wait...