Hi Henrik, et al

<<
> Why we're on the subject of new datatypes, what others are needed?
> Degrees (and minutes) perhaps?

We could go on with every single SI unit in existance?

It would be cool if Rebol knew that the unit of voltage divided with amps is
ohm. This way, certain datatypes could get much more than just descriptive,
but
it would probably be too much bloat to implement that. Stupid idea, anyway.
:-)
>>

Not a stupid idea at all. This is where I see dialects playing an important
role, and comes back to what I said in my reply to Andrew, that this is
where I've thought percentages would fit best. You might want to make them a
compound data type, like money, with a precision component that you can
specify. Dealing with monetary values would generally require less precision
than decimal values in the context of scientific use.

I haven't thought about it enough to come up with a good design but, in the
past, I built a Percent object datatype with a number of properties for
flexibility: DecimalPlaces, Precision (i.e. interval rounding), Rounding
(up, truncate, etc), and range limits. For example, mortgages in the U.S.
are priced in eighths, so you need to specify three decimal places with a
precision of 1/8.

Because of floating point errors, you may also need to perform intermediate
smoothing of values to ensure the final outcome is what you expect. I
haven't tested the money! datatype against my other stuff to see how it
fares, but I expect I will at some point. I know there are some basic issues
affecting it already, as people have mentioned here are elsewhere.

Another thing to consider is how monetary values are changing. Eventually,
though maybe not real soon, we will see micropayments instituted. How should
money! and percent! work with .000125% of $0.0001?

--Gregg

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to