× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Actually, you'd get zero for 0.01 to 500.00.  You'd get four dollars for
500.01 to 1000.00.  You'd get eight dollars for 1000.01 to 1500.00.  It's a
simple step algorithm, and I used the variant that yielded zero for the
first step rather than one.  Corrected answer:

   (int((x - delta) / y) + step1) * z

So it would be

   fee = (%int((650 - .001) / 500) + 1) * 4.00

That being said, Jon's use of %div is better.

Joe

 
> From: Rich Duzenbury
> 
> 
> Seems like 0.01 to 0.99 here would cause a fee of 0.  In fact, anything
> up to 500?
> 
> %int( (500 - .001) / 500)
> %int( 499.999 / 500)
> %int( 0.999998 )
> 0



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.