wp34s - FIB problem (DBLON)
|
11-23-2018, 10:32 AM
Post: #4
|
|||
|
|||
RE: wp34s - FIB problem (DBLON)
(11-23-2018 08:08 AM)ijabbott Wrote:(11-22-2018 07:59 PM)Gerson W. Barbosa Wrote: That's a minor problem, actually. In double precision mode FIB returns a near-integer for most arguments. For example: I'd examined FIB(23) down to FIB(1) prior to choosing CEIL, but you're right, ROUNDI is a safer alternative. Here's my modified program: 0001 **LBL A 0002 RCL X 0003 # 002 0004 MOD 0005 STO+ X 0006 DEC X 0007 # 000 0008 ENTER[^] 0009 STOS 00 0010 R[^] 0011 FIB 0012 CEIL 0013 RCL 03 0014 INC X 0015 FIB 0016 CEIL 0017 RCL 03 0018 STO+ X 0019 INC X 0020 RCL X 0021 FIB 0022 CEIL 0023 x[<->] Y 0024 INC X 0025 FIB 0026 CEIL 0027 RCL- 02 0028 STOS 04 0029 **LBL 000 0030 RCL 07 0031 1/x 0032 STO+ 00 0033 RCL L 0034 STO- 06 0035 x[<->] 06 0036 STO 07 0037 RCL L 0038 x[^2] 0039 RCL[times] 02 0040 RCL 05 0041 RCL+ 01 0042 STO/ Y 0043 y[<->] 01 0044 RCL L 0045 STO- 04 0046 x[<->] 04 0047 STO 05 0048 DSE 03 0049 GTO 000 0050 RCL+ 01 0051 1/x 0052 RCL+ 00 0053 END 9 A --> 3.359885666243177553172011302918927 |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
wp34s - FIB problem (DBLON) - Gerson W. Barbosa - 11-22-2018, 07:59 PM
RE: wp34s - FIB problem (DBLON) - Paul Dale - 11-23-2018, 03:23 AM
RE: wp34s - FIB problem (DBLON) - Gerson W. Barbosa - 11-23-2018, 10:45 AM
RE: wp34s - FIB problem (DBLON) - Paul Dale - 11-24-2018, 08:37 PM
RE: wp34s - FIB problem (DBLON) - Gerson W. Barbosa - 11-24-2018, 11:58 PM
RE: wp34s - FIB problem (DBLON) - ijabbott - 11-23-2018, 08:08 AM
RE: wp34s - FIB problem (DBLON) - Gerson W. Barbosa - 11-23-2018 10:32 AM
RE: wp34s - FIB problem (DBLON) - Gerson W. Barbosa - 10-14-2021, 03:25 AM
|
User(s) browsing this thread: 2 Guest(s)