in reply to Re: Money Regex
in thread Money Regex

This can fail depending on how $cash*100 rounds
If your processor uses ANSI/IEEE 754-1985 floating point numbers, try floor(100*1.14)

Replies are listed 'Best First'.
Re: Re: Re: Money Regex
by AgentM (Curate) on Feb 06, 2001 at 03:01 UTC
    Except that there shouldn't be anything there to affect the rounding. Everything greater than the hundreth place should be zero as described in the examples.
    AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.
      That's fine if FLT_RADIX on your machine is 10, but if your FLT_RADIX happens to be something like 2, the hundreth place may be inexact, except at .00 .25 .50 or .75