Re: Random again
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 47461
interpreted = N
texte = on 2/4/03 7:18 PM, Tim Robinson at tim@idfk.com.au so noted...> A while ago there was some discussion about using [math]ceil([RANDOM> format=float]*(randomrange))[/math] to get a random number. We were just> trying this and came up with an anomaly: including the occasional negative> number!!! (and the negative number always is in the range -480 to -490ish.Mac OS X 10.2.3 WebDNA 4.5I'm seeing the same thing.It looks like every so often, [random format=float] kicks out a very smallnumber that gets converted to scientific notation (like 3.62359e-05) andcauses the large negative numbers in the calculation.Forcing the random number to a six-digit float is a kludge that gets aroundthis.Change:ceil([random format=float]*99)To:ceil([format .6f][random format=float][/format]*99)If this is a WebDNA bug, I'll be doing some global search/replace withBBEdit tonight. : (Rob MarquardtDesigner/Resident WireheadToast Design800 Washington Avenue NorthMinneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.com-------------------------------------------------------------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:
|
- Re: Random again (Rob Marquardt 2003)
- Random again (Tim Robinson 2003)
|
on 2/4/03 7:18 PM, Tim Robinson at tim@idfk.com.au so noted...> A while ago there was some discussion about using [math]ceil([RANDOM> format=float]*(randomrange))[/math] to get a random number. We were just> trying this and came up with an anomaly: including the occasional negative> number!!! (and the negative number always is in the range -480 to -490ish.Mac OS X 10.2.3 WebDNA 4.5I'm seeing the same thing.It looks like every so often, [random format=float] kicks out a very smallnumber that gets converted to scientific notation (like 3.62359e-05) andcauses the large negative numbers in the calculation.Forcing the random number to a six-digit float is a kludge that gets aroundthis.Change:ceil([random format=float]*99)To:ceil([format .6f][random format=float][/format]*99)If this is a WebDNA bug, I'll be doing some global search/replace withBBEdit tonight. : (Rob MarquardtDesigner/Resident WireheadToast Design800 Washington Avenue NorthMinneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.com-------------------------------------------------------------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/
Rob Marquardt
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:
[Announce] Newest Commerce Site based on WebCatalog (1997)
Solution help needed (1998)
Narrowing NT Crashing error (2000)
duplicating cart items (1998)
Gettting IPAddress (2001)
price on detail, but not shoppingcart (1997)
sort without the or a (1998)
docs for WebCatalog2 (1997)
[LOOKUP] (1997)
More than one db with the same namn (was: WC2f3) (1997)
shown next / show prev (1998)
WebDNA 5.0 Enterprise Edition (2003)
shipping calcs (1998)
ShipCosts database (1997)
MacAuthorize and WebCatalog Questions (2000)
Field validation problem (1999)
Any word on upload feature? (2000)
Protecting webdelivery (1997)
WebDNA4.5 OS-X CPU Usage? (2003)
Online reference (1997)