Post Reply 
How I can change the format of unit one DM42/Free42
01-08-2021, 01:30 PM
Post: #21
RE: How I can change the format of unit one DM42/Free42
Ok but Is still not fixing my problem

(01-08-2021 01:18 PM)grsbanks Wrote:  
(01-08-2021 01:14 PM)fs5qc Wrote:  Why no * on RCL "L" ?

Because you're starting out with the value in that variable. You're not multiplying something else by it.

Please see the section of the manual devoted to register arithmetic.
Find all posts by this user
Quote this message in a reply
01-08-2021, 04:07 PM (This post was last modified: 01-08-2021 04:08 PM by Sylvain Cote.)
Post: #22
RE: How I can change the format of unit one DM42/Free42
(01-08-2021 03:39 AM)fs5qc Wrote:  I don’t want to deal with a answer with a E.

(01-08-2021 01:30 PM)fs5qc Wrote:  Ok but Is still not fixing my problem

Reading the initial question and answers, I going back to basics, just in case.

If the number of digits of the result is greater than the maximum of the digit the calculator can handle, the calculator will keep the most significant digits and will adjust the exponent to keep the number valid, when that happen you have no choice but to deal with the E.

In your case, if you do [SHIFT] [DISP] [ALL] and the value in X still have E in it, then this is what the calculator has internally, removing the exponent will render the number invalid.
Find all posts by this user
Quote this message in a reply
01-08-2021, 06:40 PM
Post: #23
RE: How I can change the format of unit one DM42/Free42
Yes I understand that but why if I am doing a program that Doing l*h*w=v and I input l=5 h=5 w=5 that I not getting 125
Find all posts by this user
Quote this message in a reply
01-08-2021, 07:00 PM
Post: #24
RE: How I can change the format of unit one DM42/Free42
I got it I need to do DISP FIX and 2
(01-08-2021 04:07 PM)Sylvain Cote Wrote:  
(01-08-2021 03:39 AM)fs5qc Wrote:  I don’t want to deal with a answer with a E.

(01-08-2021 01:30 PM)fs5qc Wrote:  Ok but Is still not fixing my problem

Reading the initial question and answers, I going back to basics, just in case.

If the number of digits of the result is greater than the maximum of the digit the calculator can handle, the calculator will keep the most significant digits and will adjust the exponent to keep the number valid, when that happen you have no choice but to deal with the E.

In your case, if you do [SHIFT] [DISP] [ALL] and the value in X still have E in it, then this is what the calculator has internally, removing the exponent will render the number invalid.
Find all posts by this user
Quote this message in a reply
01-08-2021, 07:18 PM
Post: #25
RE: How I can change the format of unit one DM42/Free42
(01-08-2021 06:40 PM)fs5qc Wrote:  Yes I understand that but why if I am doing a program that Doing l*h*w=v and I input l=5 h=5 w=5 that I not getting 125

As explained previously your program is not correct and will not return 125. Try with the program example from the HP-42S manual that was quoted by Steve Simpkin.
Find all posts by this user
Quote this message in a reply
01-08-2021, 07:21 PM
Post: #26
RE: How I can change the format of unit one DM42/Free42
I correct it now I got the good answer

Thanks for your help
I am not use with the 42 but more with the prime or the ti 84 plus
(01-08-2021 07:18 PM)Didier Lachieze Wrote:  
(01-08-2021 06:40 PM)fs5qc Wrote:  Yes I understand that but why if I am doing a program that Doing l*h*w=v and I input l=5 h=5 w=5 that I not getting 125

As explained previously your program is not correct and will not return 125. Try with the program example from the HP-42S manual that was quoted by Steve Simpkin.
Find all posts by this user
Quote this message in a reply
01-08-2021, 07:28 PM (This post was last modified: 01-08-2021 07:37 PM by Sylvain Cote.)
Post: #27
RE: How I can change the format of unit one DM42/Free42
Code:
formula → Length * Width * Height = Volume
f(x)=0  → ( Length * Width * Height ) — Volume = 0

Analysis of your program: (not working)
Code:
01▸LBL "VOL"   // Volume calculation program
02 MVAR "V"    // Volume
03 MVAR "W"    // Width
04 MVAR "L"    // Length
05 MVAR "H"    // Height
06 STO "W"     // overwriting W with X content, whatever it is
07 STO "L"     // overwriting L with X content, whatever it is
08 STO "H"     // overwriting H with X content, whatever it is
09 RCL "L"     // X = Length (unknown value)
10 RCL "H"     // X = Height (unknown value) & Y = Length (unknown value)
11 ×           // X = X * Y  (unknown value)
12 RCL× "W"    // X = X * Width (unknown value)
13 STO "V"     // overwriting V with X content, whatever it is
14 RCL "V"     // X = Volume (unknown value)
15 END         // end of the program

Analysis of the user's manual program: (working)
Code:
01▸LBL "VOL"   // Volume calculation program
02 MVAR "L"    // Length
03 MVAR "W"    // Width
04 MVAR "H"    // Height
05 MVAR "V"    // Volume
06 RCL "L"     // X =     Length    // X =   Length
07 RCL* "W"    // X = X * Width     // X =   Length * Width
08 RCL* "H"    // X = X * Height    // X =   Length * Width * Height
09 RCL- "V"    // X = X - Volume    // X = ( Length * Width * Height ) - Volume
10 END         // end of the program

Solving: [yellow-key] [SOLVER] [VOL] 5 [L] 5 [W] 5 [H] [V] → 125

edit: typos
Find all posts by this user
Quote this message in a reply
01-08-2021, 07:31 PM (This post was last modified: 01-08-2021 07:34 PM by Didier Lachieze.)
Post: #28
RE: How I can change the format of unit one DM42/Free42
(01-08-2021 07:21 PM)fs5qc Wrote:  Thanks for your help
I am not use with the 42 but more with the prime or the ti 84 plus

If you are not familiar with the HP-42S you may find the following book useful: An Easy Course in Using the HP-42S.
Find all posts by this user
Quote this message in a reply
01-08-2021, 07:36 PM
Post: #29
RE: How I can change the format of unit one DM42/Free42
Thanks I found my error on my code

My new code is

00 { 32-Byte Prgm }
01▸LBL "VOL"
02 MVAR "V"
03 MVAR "W"
04 MVAR "L"
05 MVAR "H"
06 RCL "W"
07 RCL× "L"
08 RCL× "H"
09 RCL "V"
10 -
11 END



(01-08-2021 07:28 PM)Sylvain Cote Wrote:  
Code:
formula → Length * Width * Height = Volume
f(x)=0  → ( Length * Width * Height ) — Volume = 0

Analysis of your program: (not working)
Code:
01▸LBL "VOL"   // Volume calculation program
02 MVAR "V"    // Volume
03 MVAR "W"    // Width
04 MVAR "L"    // Length
05 MVAR "H"    // Height
06 STO "W"     // overwriting W with X content with whatever it is
07 STO "L"     // overwriting L with X content with whatever it is
08 STO "H"     // overwriting H with X content with whatever it is
09 RCL "L"     // X = Length (unknown value)
10 RCL "H"     // X = Height (unknown value) & Y = Length (unknown value)
11 ×           // X = X * Y  (unknown value)
12 RCL× "W"    // X = X * Width (unknown value)
13 STO "V"     // overwriting V with X content with whatever it is
14 RCL "V"     // X = Volume (unknown value)
15 END         // end of the program

Analysis of the user's manual program: (working)
Code:
01▸LBL "VOL"   // Volume calculation program
02 MVAR "L"    // Length
03 MVAR "W"    // Width
04 MVAR "H"    // Height
05 MVAR "V"    // Volume
06 RCL "L"     // X =     Length    // X =   Length
07 RCL* "W"    // X = X * Width     // X =   Length * Width
08 RCL* "H"    // X = X * Height    // X =   Length * Width * Height
09 RCL- "V"    // X = X - Volume    // X = ( Length * Width * Height ) - Volume
10 END         // end of the program

Solving: [yellow-key] [SOLVER] [VOL] 5 [L] 5 [W] 5 [H] [V]
Find all posts by this user
Quote this message in a reply
01-08-2021, 07:39 PM
Post: #30
RE: How I can change the format of unit one DM42/Free42
Thanks I would for sure take a look I also got a friend that wants to learn it

(01-08-2021 07:31 PM)Didier Lachieze Wrote:  
(01-08-2021 07:21 PM)fs5qc Wrote:  Thanks for your help
I am not use with the 42 but more with the prime or the ti 84 plus

If you are not familiar with the HP-42S you may find the following book useful: An Easy Course in Using the HP-42S.
Find all posts by this user
Quote this message in a reply
01-08-2021, 07:40 PM
Post: #31
RE: How I can change the format of unit one DM42/Free42
(01-08-2021 07:36 PM)fs5qc Wrote:  My new code is

00 { 32-Byte Prgm }
01▸LBL "VOL"
02 MVAR "V"
03 MVAR "W"
04 MVAR "L"
05 MVAR "H"
06 RCL "W"
07 RCL× "L"
08 RCL× "H"
09 RCL "V"
10 -
11 END

These two lines:
Code:
09 RCL "V"
10 -

can be replaced by this line
Code:
09 RCL- "V"
Find all posts by this user
Quote this message in a reply
01-08-2021, 07:41 PM
Post: #32
RE: How I can change the format of unit one DM42/Free42
Oh ok I see thanks Smile
(01-08-2021 07:40 PM)Sylvain Cote Wrote:  
(01-08-2021 07:36 PM)fs5qc Wrote:  My new code is

00 { 32-Byte Prgm }
01▸LBL "VOL"
02 MVAR "V"
03 MVAR "W"
04 MVAR "L"
05 MVAR "H"
06 RCL "W"
07 RCL× "L"
08 RCL× "H"
09 RCL "V"
10 -
11 END

These two lines:
Code:
09 RCL "V"
10 -

can be replaced by this line
Code:
09 RCL- "V"
Find all posts by this user
Quote this message in a reply
01-08-2021, 08:06 PM
Post: #33
RE: How I can change the format of unit one DM42/Free42
So

00 { 31-Byte Prgm }
01▸LBL "VOL"
02 MVAR "V"
03 MVAR "W"
04 MVAR "L"
05 MVAR "H"
06 RCL "W"
07 RCL× "L"
08 RCL× "H"
09 RCL- "V"
10 END


(01-08-2021 07:41 PM)fs5qc Wrote:  Oh ok I see thanks Smile
(01-08-2021 07:40 PM)Sylvain Cote Wrote:  These two lines:
Code:
09 RCL "V"
10 -

can be replaced by this line
Code:
09 RCL- "V"
Find all posts by this user
Quote this message in a reply
Post Reply 




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