c3d / db48x

RPL runtime for the DM42 calculator, in the spirit of HP48/49/50
http://48calc.org
GNU Lesser General Public License v3.0
78 stars 10 forks source link

Unit conversions with additive factor #1064

Open c3d opened 1 month ago

c3d commented 1 month ago

We need a way to implement conversions with an additive factors, e.g. Kelvin to Celsius and conversely.

Wiljea commented 1 month ago

Suggestion: The idea is to relate in each case (by providing the corresponding equations in the csv file) to or from the most fundamental or primary SI unit of the same category. For instance, in the case of temperature we have to relate to kelvin (K) and use it in intermediate step for conversion between Tˍ°C and Tˍ°F the relevant equations are: Tˍ°C=TˍK+273.15 and Tˍ°F=9/5(TˍK+273,15)+32 and their converse: TˍK=Tˍ°C-273.15 and TˍK=5/9(Tˍ°F-32)-273.15

Wiljea commented 1 month ago

This idea to include additional info (like equations and uncertainty) in the CSV files would also apply to the physical constants case in a future development. Indeed, the db48 platform (with its adjustable precision) provides the best imaginable tool to calculate physical quantities with the sufficient and maximum precision available. We have to remind that since 2019, the SI unit system was completely redefined and finally unified with this precise goal in mind. We have now precisely defined fundamental constants (like c, NA, h, e, etc.) and secondary ones which depend directly (through defining equations) on the former and on some precise measurement (of given constants and their actual uncertainty). For instance the magnetic permeability (μo ± Δμo) depends strictly on the measured value the affine structure constant (α ± Δα). The relevant equations are : *μo=2αh/(e^2c) and Δμo/μo=Δα/α as simple as that ! Therefore, from the point view of a modern physicist, a universal calculator should provides for these complete information : Values, units, uncertainties, defining eqs for val and Δ**.

There is no such hand-calculator to date (besides Maple or Mathematica which are heavy duty and cumbersome tools). And we have this unique opportunity to create one. I might be able to provide the relevant equations if you are interested (I already have a working prototype in Excel). And you will understand my personal interests for random numbers, uncertainty evaluation, error propagation (under given prob. distr.) and interval arithmetic. (I am the same person as jeanwilson from the SwissMacros and HP Forum and we already communicate). These ideas and projects are for a future that I like very much to imagine ! The beauty of such a formidable calculation engine is its possibility to remain perfectly up to date (for instance, assume that next year a more precise value of α or G is measured, then all the related constants and calculations are adjusted accordingly). Is it just a dream ? I don't think so ! And the RPL engine of the db48 is a perfect target for the best (more complete, precise, etc.) calculator that one can realize and might dream of.