Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple formulas to convert weights
Message
From
07/11/2015 08:34:21
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
07/11/2015 07:58:41
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Science & Medicine
Category:
Mathematics
Miscellaneous
Thread ID:
01627170
Message ID:
01627205
Views:
35
>kg = 1 kg
>gram = 0.001 kg
>pound (Avoirdupois) = 0.453592 kg
>pound (Germany) = 0.5 kg
>ton = 1000 kg (also known as "metric ton")
>ton (US) = 907.2 kg
>short ton (US) = 1016 kg
>solar mass = 1.988e30 kg (often used for comparisons in astronomy)
>
>Now, to convert, say, from "ton" to "ton (US)", you would look both up in a table, check that they both convert to the same base units, in this case kg (it makes no sense to convert kilogram to meters, or square meters to meters, though this is a frequent question in online forums...) and then just divide one value by the other.
>
>Similarly, you would store different length units in terms of meters, different area units in terms of square meters, etc.

Hi Hilmar,

but then you got two operations between non SI with two imprecise operators.
This limits the array to n-1.
If you do full you get n² and with division minimum sum(x-1) for x=1,n but for the cost of more code. Depends a bit on the
-time to create the array vs time to run complex code
-speed you need
-complexity

In sense of speed a full blown CASE struct is very fast (two to three (if you parse out same target extra) decisions) but very complex.
Two decision thing code grows faster then square, n²+n I guess. Sounds not very comfortable.

:)
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform