Re: Math problems?

2006-05-22 Thread Jim Ault
replace . with space in it get word 2 of it Jim Ault Las Vegas On 5/21/06 10:01 PM, Kay C Lan [EMAIL PROTECTED] wrote: Peter T. Evens originally wrote: Is there another way to isolate the decimal portion? On 5/20/06, Scott Rossi [EMAIL PROTECTED] wrote: Here's one way (I bet there

Re: Math problems?

2006-05-22 Thread Sarah Reichelt
Oh, that's just TOOO clever :-) I reckon this one wins the prize! Sarah On 5/22/06, Jim Ault [EMAIL PROTECTED] wrote: replace . with space in it get word 2 of it Jim Ault Las Vegas On 5/21/06 10:01 PM, Kay C Lan [EMAIL PROTECTED] wrote: Peter T. Evens originally wrote: Is there

Re: Math problems?

2006-05-22 Thread Mark Schonewille
For correct results, use: theNumber mod 1 e.g.: put ((1/3) mod 1) * 10E9 Best, Mark -- Economy-x-Talk Consultancy and Software Engineering http://economy-x-talk.com http://www.salery.biz Salery is the easiest way to get your own web store on-line: http:// www.salery.biz/salery.html

Re: Math problems?

2006-05-22 Thread Peter T. Evensen
I must admit this was on a Windows machine. Intel is notorious for math issues (well maybe not notorious). Remember the Pentium problem way back that had researchers up in arms? I guess the new Mactel machines, however, will give the same results. I don't have one here yet to try it on.

Re: Math problems?

2006-05-22 Thread Mark Wieder
Dar- Sunday, May 21, 2006, 5:32:25 PM, you wrote: There are values for numberFormat that will break that. So, perhaps a Ah... good point. I *do* regard tacking on an empty string to trick the parser as a hack, and I haven't tried it in conjunction with setting a non-default numberFormat. But I

Re: Math problems?

2006-05-22 Thread Dar Scott
On May 22, 2006, at 11:06 AM, Mark Wieder wrote: I *do* regard tacking on an empty string to trick the parser as a hack, and I haven't tried it in conjunction with setting a non-default numberFormat. But I always thought numberFormat was a post-numeric-processing display thing. I had not

Re: Math problems?

2006-05-21 Thread Mark Wieder
Dar- Saturday, May 20, 2006, 4:18:10 PM, you wrote: What would you recommend as the new behavior for Revolution trunc()? Actually, I'm quite happy with what I posted as new behavior. I never use trunc() by itself anymore, always tacking an empty string onto the end. This gives the desired

Re: Math problems?

2006-05-21 Thread Mark Wieder
Richard- Saturday, May 20, 2006, 1:54:40 PM, you wrote: This sounds very much like an issue we batted around here last year with trunc that turned out to be a feature of the processor Indeed. See my answer to Dar. Although it's not a feature of the processor so much as of the way standard

Re: Math problems?

2006-05-21 Thread Dar Scott
On May 21, 2006, at 5:48 PM, Mark Wieder wrote: Tacking an empty string before truncating always gives the correct answer. There are values for numberFormat that will break that. So, perhaps a value for numberFormat will need to be specified if that is the new trunc(). I had one time

Re: Math problems?

2006-05-21 Thread Kay C Lan
Peter T. Evens originally wrote: Is there another way to isolate the decimal portion? On 5/20/06, Scott Rossi [EMAIL PROTECTED] wrote: Here's one way (I bet there are more): get char offset(.,tNumber) to -1 of tNumber set the itemDelimiter to . --item 1 is the integer --item 2 is

Re: Math problems?

2006-05-20 Thread Mark Smith
Avoiding trunc(), this seems to work put round((10.27 mod 1) *100,0) Best, Mark ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

Re: Math problems?

2006-05-20 Thread Mark Wieder
Peter- Friday, May 19, 2006, 12:04:55 PM, you wrote: I am doing the following: put 10.27 into tNumber put the trunc of tNumber into tInteger put tNumber - tInteger into tDecimal put 100 * tDecimal into tNew Decimal put the trunc of tNewDecimal and I get 26 instead of 27. put

Re: Math problems?

2006-05-20 Thread Richard Gaskin
Mark Wieder wrote: Peter- Friday, May 19, 2006, 12:04:55 PM, you wrote: I am doing the following: put 10.27 into tNumber put the trunc of tNumber into tInteger put tNumber - tInteger into tDecimal put 100 * tDecimal into tNew Decimal put the trunc of tNewDecimal and I get 26 instead of

Re: Math problems?

2006-05-20 Thread Dar Scott
On May 20, 2006, at 1:09 PM, Mark Wieder wrote: Note: this is BZ #2419, which for some reason Tuviah closed as NOT_A_BUG in January 2004, so unless Jacque reopens it it's unlikely that it will be fixed. What would you recommend as the new behavior for Revolution trunc()? I'm assuming you

Re: Math problems?

2006-05-20 Thread J. Landman Gay
Mark Wieder wrote: Peter- Friday, May 19, 2006, 12:04:55 PM, you wrote: I am doing the following: put 10.27 into tNumber put the trunc of tNumber into tInteger put tNumber - tInteger into tDecimal put 100 * tDecimal into tNew Decimal put the trunc of tNewDecimal and I get 26 instead of

Re: Math problems?

2006-05-20 Thread Dar Scott
On May 20, 2006, at 6:04 PM, J. Landman Gay wrote: By the way, I just tried the original script (quoted at the top above,) using Mac OS 10.4.6 and I did not get 26, I got 27 as expected. I suspect it is system-related. I believe the Rev engine relies on the OS's math routines to get its

Re: Math problems?

2006-05-20 Thread J. Landman Gay
Dar Scott wrote: On May 20, 2006, at 6:04 PM, J. Landman Gay wrote: By the way, I just tried the original script (quoted at the top above,) using Mac OS 10.4.6 and I did not get 26, I got 27 as expected. I suspect it is system-related. I believe the Rev engine relies on the OS's math

Math problems?

2006-05-19 Thread Peter T. Evensen
I am doing the following: put 10.27 into tNumber put the trunc of tNumber into tInteger put tNumber - tInteger into tDecimal put 100 * tDecimal into tNew Decimal put the trunc of tNewDecimal and I get 26 instead of 27. Am I doing something wrong? Is this a bug? Is there another way to

Re: Math problems?

2006-05-19 Thread Jim Ault
try get 10.27 get (it-(it div 1)*100 Jim Ault Las Vegas On 5/19/06 12:04 PM, Peter T. Evensen [EMAIL PROTECTED] wrote: I am doing the following: put 10.27 into tNumber put the trunc of tNumber into tInteger put tNumber - tInteger into tDecimal put 100 * tDecimal into tNew Decimal put

Re: Math problems?

2006-05-19 Thread Mark Swindell
put 10.27 into tNumber put the trunc of tNumber into tInteger put tNumber - tInteger into tDecimal put 100 * tDecimal into tNew Decimal put tNewDecimal -- put the trunc of tNewDecimal = 27 On May 19, 2006, at 12:04 PM, Peter T. Evensen wrote: put 10.27 into tNumber put the trunc of

Re: Math problems?

2006-05-19 Thread Scott Rossi
Recently, Peter T. Evensen wrote: I am doing the following: put 10.27 into tNumber put the trunc of tNumber into tInteger put tNumber - tInteger into tDecimal put 100 * tDecimal into tNew Decimal put the trunc of tNewDecimal and I get 26 instead of 27. Am I doing something wrong?

Re: Math problems?

2006-05-19 Thread Peter T. Evensen
It seems like there is some funky math going on here. In looking at things, after 100 * tDecimal into tNewDecimal, tNewDecimal contains 27 the trunc of 27 should be 27, not 26. At 02:17 PM 5/19/2006, you wrote: put 10.27 into tNumber put the trunc of tNumber into tInteger put tNumber -

Re: Math problems?

2006-05-19 Thread Peter T. Evensen
Ok, I didn't think of just using the string functions. I guess I'm too used to typed languages. LOL At 02:20 PM 5/19/2006, you wrote: Recently, Peter T. Evensen wrote: I am doing the following: put 10.27 into tNumber put the trunc of tNumber into tInteger put tNumber - tInteger into

Re: Math problems?

2006-05-19 Thread Phil Davis
Peter T. Evensen wrote: I am doing the following: put 10.27 into tNumber put the trunc of tNumber into tInteger put tNumber - tInteger into tDecimal put 100 * tDecimal into tNew Decimal put the trunc of tNewDecimal and I get 26 instead of 27. Am I doing something wrong? Is this a bug? Is

Re: Math problems?

2006-05-19 Thread Jan Schenkel
--- Mark Swindell [EMAIL PROTECTED] wrote: put 10.27 into tNumber put the trunc of tNumber into tInteger put tNumber - tInteger into tDecimal put 100 * tDecimal into tNew Decimal put tNewDecimal -- put the trunc of tNewDecimal = 27 On May 19, 2006, at 12:04 PM, Peter T.

Re: Math problems?

2006-05-19 Thread Dar Scott
On May 19, 2006, at 1:04 PM, Peter T. Evensen wrote: put 10.27 into tNumber put the trunc of tNumber into tInteger put tNumber - tInteger into tDecimal put 100 * tDecimal into tNew Decimal put the trunc of tNewDecimal and I get 26 instead of 27. Am I doing something wrong? Is this a bug?