Calculating e^x-1 on classic HPs
01-13-2016, 03:46 PM
Post: #10
 Gerson W. Barbosa Senior Member Posts: 1,182 Joined: Dec 2013
RE: Calculating e^x-1 on classic HPs
(01-12-2016 08:16 PM)Dieter Wrote:  The following version returns ex–1 while it saves the Y-register. It also does not use R^ which is missing on some of the classic calculators.

Code:
e^x ENTER ENTER LastX x<>y LN - x<>y x LastX 1 - + RTN

Very nice, thank you!

Just tested it on the HP-12C. I've tried an hyperbolic function approach on the HP-15C using the identity

$e^{x}-1=\frac{2}{\coth \frac{x}{2}-1}$

Code:
 001-42.21.11   f LBL A 002-          2     2 003-         10     /  004-42.22.25   f HYP TAN 005-         15    1/x 006-           1    1 007-         30     - 008-           2    2 009-         34     x<>y 010-         10     / 011-     43 32  g RTN

However this will require two additional steps to handle x=0. Also, for |x| > 3 the results start to lose accuracy as tanh(|x/2|) approaches 1.

Congratulations for your brilliant method!

Gerson.
 « Next Oldest | Next Newest »

 Messages In This Thread Calculating e^x-1 on classic HPs - Dieter - 01-11-2016, 10:20 PM RE: Calculating e^x-1 on classic HPs - Thomas Klemm - 01-12-2016, 01:41 AM RE: Calculating e^x-1 on classic HPs - Dieter - 01-12-2016, 06:12 PM RE: Calculating e^x-1 on classic HPs - Claudio L. - 01-12-2016, 05:13 AM RE: Calculating e^x-1 on classic HPs - Dieter - 01-12-2016, 02:02 PM RE: Calculating e^x-1 on classic HPs - ElectroDuende - 01-12-2016, 03:34 PM RE: Calculating e^x-1 on classic HPs - Dieter - 01-12-2016, 06:30 PM RE: Calculating e^x-1 on classic HPs - Claudio L. - 01-12-2016, 09:44 PM RE: Calculating e^x-1 on classic HPs - Dieter - 01-12-2016, 08:16 PM RE: Calculating e^x-1 on classic HPs - Gerson W. Barbosa - 01-13-2016 03:46 PM RE: Calculating e^x-1 on classic HPs - Dieter - 01-13-2016, 06:43 PM RE: Calculating e^x-1 on classic HPs - Gerson W. Barbosa - 01-14-2016, 02:47 AM RE: Calculating e^x-1 on classic HPs - Dieter - 01-14-2016, 01:44 PM RE: Calculating e^x-1 on classic HPs - Gerson W. Barbosa - 01-14-2016, 03:30 PM RE: Calculating e^x-1 on classic HPs - Gerson W. Barbosa - 01-14-2016, 06:50 PM RE: Calculating e^x-1 on classic HPs - Dieter - 01-14-2016, 07:38 PM RE: Calculating e^x-1 on classic HPs - Gerson W. Barbosa - 01-14-2016, 07:50 PM RE: Calculating e^x-1 on classic HPs - Albert Chan - 02-02-2019, 07:32 PM RE: Calculating e^x-1 on classic HPs - Dieter - 02-03-2019, 06:46 PM RE: Calculating e^x-1 on classic HPs - Paul Dale - 01-14-2016, 07:20 AM RE: Calculating e^x-1 on classic HPs - Dieter - 01-14-2016, 01:48 PM RE: Calculating e^x-1 on classic HPs - emece67 - 01-14-2016, 03:55 PM RE: Calculating e^x-1 on classic HPs - Dieter - 01-14-2016, 06:42 PM RE: Calculating e^x-1 on classic HPs - emece67 - 01-14-2016, 09:14 PM RE: Calculating e^x-1 on classic HPs - Dieter - 01-14-2016, 09:55 PM RE: Calculating e^x-1 on classic HPs - Paul Dale - 01-15-2016, 01:19 AM RE: Calculating e^x-1 on classic HPs - Dieter - 01-15-2016, 02:00 PM RE: Calculating e^x-1 on classic HPs - matthiaspaul - 01-15-2016, 10:10 AM RE: Calculating e^x-1 on classic HPs - Gerson W. Barbosa - 01-15-2016, 06:07 PM RE: Calculating e^x-1 on classic HPs - Dieter - 01-15-2016, 06:46 PM RE: Calculating e^x-1 on classic HPs - Gerson W. Barbosa - 01-15-2016, 10:45 PM RE: Calculating e^x-1 on classic HPs - Dieter - 01-16-2016, 08:19 AM RE: Calculating e^x-1 on classic HPs - Gerson W. Barbosa - 01-16-2016, 12:40 PM RE: Calculating e^x-1 on classic HPs - Dieter - 01-16-2016, 01:32 PM RE: Calculating e^x-1 on classic HPs - Albert Chan - 02-02-2019, 07:22 PM RE: Calculating e^x-1 on classic HPs - Paul Dale - 01-14-2016, 09:22 PM RE: Calculating e^x-1 on classic HPs - Dieter - 01-14-2016, 09:49 PM RE: Calculating e^x-1 on classic HPs - Paul Dale - 01-15-2016, 01:15 AM RE: Calculating e^x-1 on classic HPs - Albert Chan - 02-03-2019, 08:28 PM RE: Calculating e^x-1 on classic HPs - Albert Chan - 02-04-2019, 07:28 PM RE: Calculating e^x-1 on classic HPs - Dieter - 02-04-2019, 07:59 PM

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