Post Reply 
Numbers within units (50g)
09-15-2015, 09:53 PM
Post: #1
Numbers within units (50g)
Is there any use for allowing numbers within units?

For example: the 50g accepts:

2_2 --> 4

I guess the unit 2 could be thought of like "pairs"? It's immediately converted to the number 4 upon compilation.
It could be a twisted way to input fractions, as you can input 3_1/2 to enter 3/2, except it gets immediately compiled to 1.5.

1_m/2 --> 0.5_m
The unit in this case is 'm/2' or 'half-meter', and is converted to 'm' upon compilation.

Is this intentional and documented somewhere? or is it just an artifact of the implementation? Is it like this also on the 48S and 48G?

It seems they are allowed to be typed and compiled, but they are not allowed to exist in the unit object, since the compiler eliminates them by multiplying them into the value.

Within symbolics it gets weird:

'3_m/2+2_ft' is actually compiled into '1.5_m+2_ft'
'3_(m)/2+2_ft' is also compiled to '1.5_m+2_ft'
'(3_m)/2+2_ft' is the only way to get the expression with the /2.

Is there any use for this? Seems to me there's no use, and numbers are better left out of the units for the symbolic expression to use. '3_m/2' in my head should be an expression where 3_m is divided by two, no?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Numbers within units (50g) - Claudio L. - 09-15-2015 09:53 PM
RE: Numbers within units (50g) - rprosperi - 09-16-2015, 12:55 AM
RE: Numbers within units (50g) - Bruno - 09-16-2015, 06:54 AM
RE: Numbers within units (50g) - rprosperi - 09-17-2015, 12:38 AM
RE: Numbers within units (50g) - Tugdual - 09-17-2015, 06:22 AM
RE: Numbers within units (50g) - Tugdual - 09-22-2015, 05:40 AM



User(s) browsing this thread: 1 Guest(s)