Re: Strange problem

new topic     » goto parent     » topic index » view thread      » older message » newer message

Everett Williams wrote:
>
>Neither WIDTH nor HEIGHT are either integers or atoms, but floats because
>they are declared with a decimal. I am not sure what that means for their
>use as atoms in the function Get(), but it can't be nice. In this particular
>case,
>it doesn't matter, because (att-floor(att)) will always be 0 if att has already
>been rounded to an integer by being stuffed into an atom. I think that is
>your problem.
>

In one sense, this appears to be an Euphoria error, in the sense that the
float nature of the constant is not being maintained( if I am correct) when
it is assigned to an atom in the function. In another sense, it just points
out a contradiction that the use of floats causes in Euphoria. Decimal
arithmetic does not have to use floats. Floats are sometimes faster and
more efficient, but they almost always lose significance as compared to
direct decimal calculations according to the rules of arithmetic. I would
bet that if you called att an object that the problem would go away.

Everett L.(Rett) Williams
rett at gvtc.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu