Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
manual:chapter3:units [2018/10/25 09:08] claudio |
manual:chapter3:units [2018/10/25 10:13] claudio [Operating with Units] |
||
---|---|---|---|
Line 22: | Line 22: | ||
Exponents within a unit expression can be integer numbers, real numbers or fractional exponents. The use of fractional exponents is always preferred over real numbers because they can be simplified in an exact way. \\ | Exponents within a unit expression can be integer numbers, real numbers or fractional exponents. The use of fractional exponents is always preferred over real numbers because they can be simplified in an exact way. \\ | ||
'' | '' | ||
+ | |||
+ | ==== Operating with Units ==== | ||
Unit objects can be operated upon normally, and the system will perform all the necessary unit conversions in the background. Unit consistency is strictly enforced for addition and subtraction, | Unit objects can be operated upon normally, and the system will perform all the necessary unit conversions in the background. Unit consistency is strictly enforced for addition and subtraction, | ||
Results of an addition or subtraction between consistent units will produce a result with the units of the first argument (argument in level 2 of the stack at the time of the operation, or the left argument in an algebraic expression). | Results of an addition or subtraction between consistent units will produce a result with the units of the first argument (argument in level 2 of the stack at the time of the operation, or the left argument in an algebraic expression). | ||
+ | |||
+ | Unit conversions can be performed directly using the '' | ||
+ | |||
+ | ==== Custom Units ==== | ||
+ | |||
+ | Units in newRPL can be arbitrary symbols, not just the ones predefined in the system. For example, adding '' | ||
+ | |||
+ | Custom units can also be defined as derived units, in terms of other base units. This is done with the '' | ||
+ | |||
+ | New units can also be defined in terms of new (unknown) base units. For example typing '' | ||
+ | From that moment the addition '' | ||
+ | |||
+ | Custom units work systemwide, the command '' | ||
+ | |||
+ | |||
+ | ==== Available Units ==== | ||
This is a list of the units available in the '' | This is a list of the units available in the '' |