HP71B Enhanced Math LEX

01272020, 12:42 PM
Post: #17




RE: HP71B Enhanced Math LEX
(01272020 11:35 AM)Albert Chan Wrote:(01272020 08:05 AM)JF Garnier Wrote: I understand that the alternate formula (x+y)*(xy) saves a multiplication, but does it guarantee that the result will be *always* better? I tend to agree with you. (x+y)*(xy) is better than (x*xy*y) especially when x and y are close. For instance: >X=PI @ Y=PI1E11 >Z=(X,Y) >Z*Z (6.283E11,19.7392088021) >(X+Y)*(XY) 6.28318530717E11 The last formula gives 8 more significant digits for the real part. Note, however, than in this particular case, the involution formula gives an even worst result: >Z^(2,0) (6.27015817311E11,19.7392088021) I checked the x^2 (or SQ in RPL) function on HP Saturnbased machines up to the 49G+ and they all seem to use the x*xy*y formula. So I will refrain from implementing the (x+y)*(xy) approach in the 71 Math 2 LEX, my goal is to align its performance with other machines of the time (75C, 28S, 42S), and the Z^2 case implemented as Z*Z already provides an interesting improvement. JF 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)