Re: Round to the nearest half!

This WebDNA talk-list message is from

2008


It keeps the original formatting.
numero = 69786
interpreted = N
texte = Matthew A Perosi wrote: > How many steps do you have? > y = floor(x/.5) > z = (y)(.5) > r = x - z > if r > .24 then y = y + 1 > multiply y*.5 again for the final answer > > [math]x=1.6543[/math] > [math]y=floor([x]/.5)[/math] > [math]z=[y]*.5[/math] > [math]r=[x]-[z][/math] > [showif [r]>.24] > [math]y=[y]+1[/math] > [/showif] > [math]z=[y]*.5[/math] > > z is then your answer. > > > Matthew A Perosi > Psi Prime, Inc. > http://www.psiprime.com > 323 Union Blvd. > Totowa, NJ 07512 > P: 973.413.8210 > F: 973.413.8217 Thanks Matthew, that looks better than mine.. :-) http://www.euca.us/admin/tests/math_roundtohalf.html Donovan -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE EUCA Design Center <- Web Development (specializing in eCommerce),-> <- Desktop Publishing, Print Consulting, Labels -> <-Glass Products, off-hand Classes/studio rental-> PH:>(608) 770-3822 TALK:>http://artglass-forum.com WEB:> http://www.euca.us & http://www.egg.bz =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o ------------------------------------------------------------- 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 Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Round to the nearest half! ( Donovan Brooke 2008)
  2. Re: Round to the nearest half! ( Christer Olsson 2008)
  3. Re: Round to the nearest half! ( Matthew A Perosi 2008)
  4. Re: Round to the nearest half! ( Donovan Brooke 2008)
  5. Re: Round to the nearest half! ( Matthew A Perosi 2008)
  6. Round to the nearest half! ( Donovan Brooke 2008)
Matthew A Perosi wrote: > How many steps do you have? > y = floor(x/.5) > z = (y)(.5) > r = x - z > if r > .24 then y = y + 1 > multiply y*.5 again for the final answer > > [math]x=1.6543[/math] > [math]y=floor([x]/.5)[/math] > [math]z=[y]*.5[/math] > [math]r=[x]-[z][/math] > [showif [r]>.24] > [math]y=[y]+1[/math] > [/showif] > [math]z=[y]*.5[/math] > > z is then your answer. > > > Matthew A Perosi > Psi Prime, Inc. > http://www.psiprime.com > 323 Union Blvd. > Totowa, NJ 07512 > P: 973.413.8210 > F: 973.413.8217 Thanks Matthew, that looks better than mine.. :-) http://www.euca.us/admin/tests/math_roundtohalf.html Donovan -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE EUCA Design Center <- Web Development (specializing in eCommerce),-> <- Desktop Publishing, Print Consulting, Labels -> <-Glass Products, off-hand Classes/studio rental-> PH:>(608) 770-3822 TALK:>http://artglass-forum.com WEB:> http://www.euca.us & http://www.egg.bz =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o ------------------------------------------------------------- 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 Web Archive of this list is at: http://webdna.smithmicro.com/ Donovan Brooke

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:

[delete] problem (1997) WebCat2 - [format thousands] (1997) SiteGuard Admin Feature ? (1997) Question (1997) Help with nested search (1998) Lookup within a Search (2005) [listfiles] problems (1997) PIXO (1997) Hiring: Web programmer in Seattle area (2000) Are they really global tags? (2002) user authentication via TCPSend (2005) Frustration with formulas.db (1999) Case statement (2003) Pithy questions on webcommerce & siteedit (1997) Running _every_ page through WebCat-error.html (1997) Multiple Pulldowns (1997) No comment (1997) [WebDNA] Acceleratin Search / Index Performance in a Formum Service (2013) Signal Raised Error (1997) shipcost (1997)