Re: Round up prices

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 31319
interpreted = N
texte = OK that makes sense now. Round to nearest even integer for floating point values, nearest even multiple of 10 for 5, etc. That explains why there are rounding rules in Math::BigFloat that round to even, round to odd, round to zero, round to infinity, etc.There is always going to be a limitation of how this is going to be dealt with in code. I still think that rounding .5 down is the exception rather than the rule, and not how WebCat does it apparently.John PeacockChrister Olsson wrote: > > >Ah, it was the Swedes. > > It's always the Swedes (you'll soon see in S:t Petersburg ;-) > > > But tell me, how is 25 closer to 20 than 30? > >3*10 - 25 = 5 > >25 - 2*10 = 5??? > > > >Is there an additional digit 20 and something that causes it to > >attract the rounding? Do you mean round to the nearest power of 10? > > English is not my native language so honestly I have no idea if I mean the nearest power of 10. > > .5 is rounded to nearest even integer, like: 1.5 is rounded to 2, 3.5 is rounded to 4 and 6.5 is rounded to 6. Multiply with 10 and you get how 5, 15 and so on is rounded. > > ************************************************************* > Christer Olsson Stora Nygatan 21 Phone +46 40 791 50 > Ljusa Idéer AB S-211 37 Malmoe Fax +46 40 97 99 77 > Sweden http://www.ljusaideer.se > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Associated Messages, from the most recent to the oldest:

    
  1. Re: Round up prices (Aaron Lynch 2000)
  2. Re: Round up prices (John Peacock 2000)
  3. Re: Round up prices (Aaron Lynch 2000)
  4. Re: Round up prices (John Peacock 2000)
  5. Re: Round up prices (Christer Olsson 2000)
  6. Re: Round up prices (Mark Derrick 2000)
  7. Re: Round up prices (John Peacock 2000)
  8. Re: Round up prices (Christer Olsson 2000)
  9. Re: Round up prices (John Peacock 2000)
  10. Re: Round up prices (John Butler 2000)
  11. Re: Round up prices (Scott Tolley 2000)
  12. Re: Round up prices (Mark Derrick 2000)
  13. Re: Round up prices (Mark Derrick 2000)
  14. Re: Round up prices (Kenneth Grome 2000)
  15. Round up prices (Mark Derrick 2000)
OK that makes sense now. Round to nearest even integer for floating point values, nearest even multiple of 10 for 5, etc. That explains why there are rounding rules in Math::BigFloat that round to even, round to odd, round to zero, round to infinity, etc.There is always going to be a limitation of how this is going to be dealt with in code. I still think that rounding .5 down is the exception rather than the rule, and not how WebCat does it apparently.John PeacockChrister Olsson wrote: > > >Ah, it was the Swedes. > > It's always the Swedes (you'll soon see in S:t Petersburg ;-) > > > But tell me, how is 25 closer to 20 than 30? > >3*10 - 25 = 5 > >25 - 2*10 = 5??? > > > >Is there an additional digit 20 and something that causes it to > >attract the rounding? Do you mean round to the nearest power of 10? > > English is not my native language so honestly I have no idea if I mean the nearest power of 10. > > .5 is rounded to nearest even integer, like: 1.5 is rounded to 2, 3.5 is rounded to 4 and 6.5 is rounded to 6. Multiply with 10 and you get how 5, 15 and so on is rounded. > > ************************************************************* > Christer Olsson Stora Nygatan 21 Phone +46 40 791 50 > Ljusa Idéer AB S-211 37 Malmoe Fax +46 40 97 99 77 > Sweden http://www.ljusaideer.se > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to John Peacock

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Writing multiple data into one field (1998) Where's 3.0 Online Docs? (1999) show all problem (1997) PhotoMill -> PhotoMaster (1997) Shopping Cart Problem (1998) Extended [ConvertChars] (1997) PCS Frames (1997) Shipping charges depending on tax rate? (1997) WebDNA still will not start on restart (2002) Shared Webstar Directory (1998) subscribe (2007) searchable list archive (1997) creates folders with AS (1997) Re:2nd WebCatalog2 Feature Request (1996) [WebDNA] Handy (2009) text to UTF8 (2003) Showing unopened cart (1997) sending two mails from one template (2004) payflowpro problem #2 (2003) no country? (1998)