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:
log out (2001)
Creating folders and deleting files (1997)
Cookies (1999)
Webcatalog error, Plug-in for Webstar (1996)
WebCatalog f2 Installation (1997)
[WebDNA] Clean URLS job - will pay (2010)
WebCommerce: Folder organization ? (1997)
database size? (1997)
Credit Card Number Stripping Digit (1997)
[WebDNA] help with [ReturnRaw] - why is it killing the parse of the [include] file? (2009)
Setting up WebCatalog with Retail Pro data (1996)
Security Issue (1997)
Search (1997)
searching problem (1998)
includes and cart numbers (1997)
[include] affect on filepaths for links? (1997)
Web Catalog 2 demo (1997)
Server slowing down. (1997)
Encypt Question - Making New Users.db (1999)
WebCommerce: Folder organization ? (1997)