HP Forums
How I can change the format of unit one DM42/Free42 - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: How I can change the format of unit one DM42/Free42 (/thread-16143.html)

Pages: 1 2


RE: How I can change the format of unit one DM42/Free42 - fs5qc - 01-08-2021 01:30 PM

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.



RE: How I can change the format of unit one DM42/Free42 - Sylvain Cote - 01-08-2021 04:07 PM

(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.


RE: How I can change the format of unit one DM42/Free42 - fs5qc - 01-08-2021 06:40 PM

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


RE: How I can change the format of unit one DM42/Free42 - fs5qc - 01-08-2021 07:00 PM

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.



RE: How I can change the format of unit one DM42/Free42 - Didier Lachieze - 01-08-2021 07:18 PM

(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.


RE: How I can change the format of unit one DM42/Free42 - fs5qc - 01-08-2021 07:21 PM

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.



RE: How I can change the format of unit one DM42/Free42 - Sylvain Cote - 01-08-2021 07:28 PM

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


RE: How I can change the format of unit one DM42/Free42 - Didier Lachieze - 01-08-2021 07:31 PM

(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.


RE: How I can change the format of unit one DM42/Free42 - fs5qc - 01-08-2021 07:36 PM

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]



RE: How I can change the format of unit one DM42/Free42 - fs5qc - 01-08-2021 07:39 PM

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.



RE: How I can change the format of unit one DM42/Free42 - Sylvain Cote - 01-08-2021 07:40 PM

(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"



RE: How I can change the format of unit one DM42/Free42 - fs5qc - 01-08-2021 07:41 PM

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"



RE: How I can change the format of unit one DM42/Free42 - fs5qc - 01-08-2021 08:06 PM

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"