Post Reply 
DB48X: HP48-like RPL implementation for DM42
Today, 11:14 AM
Post: #395
RE: DB48X: HP48-like RPL implementation for DM42
(Today 05:16 AM)nickapos Wrote:  Hi Christoph,

Thanks for the presentation it’s a great overview of the design philosophy and a show case of the functionality and the features. I have a question
I am trying to set up the following equation "'2*π*F*L=1/(2*π*F*C)'"
It works ok with one exception. π is not recognised as the constant, instead it is being recognised as a variable and the silver expects me to provide a value.

Is there anything special I need to do to indicate this is a constant?

Yes. As you saw from the app, constants have a special marker, that shows up as a white on black [cst]. This is unicode character Ⓒ, so the constant for π must be written Ⓒπ in the files. You can copy/paste that from the simulator as I just did.

The rationale for constants requiring a prefix was that I did not want names like R, c or N to clash with variable names. I did consider making an exception for π and there is an exception for ⅈ due to the parsing of complex numbers.

Quote:When I edit this equation in the app itself I see that pi is defined as cst π and it becomes bold in the equation but how do I transfer that to the equations file?

I hope that the above helps.

Also please consider adding the proper unit to the variables. You need to do that only once per variable in a given equation. You need to put parentheses around the unit to avoid ambiguity with * and / .

Now, your particular equation looks like a resonant frequency, and this is already a system in the equation library called Resonant Frequency under Electricity. Specifically, this is the current system (illustrating the use of units I was referring to):

{
'Qs=1÷(R_Ω)·√((L_mH)÷(C_μF))'
'Qp=(R_Ω)·√((C_μF)÷(L_mH))'
'(ω0_r/s)=2·(Ⓒπ_r)·(f0_Hz)'
'(ω0_r/s)=(1_r)÷√((L_mH)·(C_μF))'
}

The help for that equation is not written yet I believe, though this may be in the patches that Jean Wilson submitted that I did not integrate yet.

DB48X,HP,me
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
DB48X v0.4.8 is out - c3d - 10-22-2023, 11:31 PM
Release v0.5.0: Statistics and flags - c3d - 11-20-2023, 08:57 AM
v0.6.5: Minor bug fixes - c3d - 02-11-2024, 11:23 PM
Release 0.7.1 "Whip" - Bug fixes - c3d - 03-04-2024, 12:46 AM
DB48X v0.7.4 release is out - c3d - 04-14-2024, 03:05 PM
DB48X v0.7.6: Solving menu - c3d - 05-13-2024, 12:04 AM
DB48X v0.7.7: Units in solver - c3d - 06-02-2024, 11:36 PM
v0.7.10 - Interactive stack - c3d - 07-14-2024, 11:31 PM
DB48X v0.7.13 is out - c3d - 08-05-2024, 07:31 AM
DB48X v0.7.15 - c3d - 08-25-2024, 08:45 PM
DB48X v0.7.16 - c3d - 09-02-2024, 01:36 AM
DOSUBS command - grbrum - 09-04-2024, 03:37 PM
v0.7.18 - APPLY, SUBST, WHERE - c3d - 09-15-2024, 11:58 PM
Program Editing Question - spiff72 - 09-16-2024, 03:27 PM
press 2 simultaneous buttons? - grbrum - 09-30-2024, 09:01 PM
CST Custom Menu - grbrum - 10-04-2024, 05:00 AM
v0.8.2: Assignments, Custom menu - c3d - 10-21-2024, 05:49 AM
CST - grbrum - 11-05-2024, 08:07 PM
Stuttgart video - c3d - Yesterday, 08:22 PM
RE: DB48X: HP48-like RPL implementation for DM42 - c3d - Today 11:14 AM



User(s) browsing this thread: c3d, 12 Guest(s)