- Don,

If you subtract .5 from the number first (possibly .4999) it would be the

same as rounding down.

Test

^!set %x%=^$Calc(395/60-.49999;0)$

^!Info ^395/60=^%x%

^!set %x%=^$Calc(360/60-.49999;0)$

^!Info 360/60=^%x%

^!set %x%=^$Calc(359.999/60-.49999;0)$

^!Info 359.999/60=^%x%

Warner

----- Original Message -----

From: "Don Passenger" <dpasseng@...>

To: <ntb-clips@yahoogroups.com>

Sent: Sunday, October 03, 2004 1:18 PM

Subject: Re: [Clip] rounding in a clip

>

> Thanks for the quick response Lotta, I am finding an additional

> problem. It appears that these math functions are only available via

> control+e and not in clips?

>

> floor(395/60)=6

> so this does work ... but how do I get it to go in a clip ... if I can?

>

> loro wrote:

>

>> I didn't see this part.

>>

>>

>>>I also find a ROUND function in math help, but again no explaination of

>>>how it works. How might this compare to the rounddown() function in

>>>excel for example? That program offers roundup(), rounddown() and

>>>round().

>>

>>

>> I don't know Excel, but I have a hunch that CEIL and FLOOR correspond to

>> roundup() and rounddown()...

>>

>> Lotta

>>

>>

>>

>>

>>

>> Yahoo! Groups Links

>>

>>

>>

>>

>>

>>

>>

>>

>

>

>

>

> Yahoo! Groups Links

>

>

>

>

>

>

>

Don,

If you subtract .5 from the number first (possibly .4999) it would be the

same as rounding down.

Test

^!set %x%=^$Calc(395/60-.49999;0)$

^!Info ^395/60=^%x%

^!set %x%=^$Calc(360/60-.49999;0)$

^!Info 360/60=^%x%

^!set %x%=^$Calc(359.999/60-.49999;0)$

^!Info 359.999/60=^%x%

Warner

----- Original Message -----

From: "Don Passenger" <dpasseng@...>

To: <ntb-clips@yahoogroups.com>

Sent: Sunday, October 03, 2004 1:18 PM

Subject: Re: [Clip] rounding in a clip

>

> Thanks for the quick response Lotta, I am finding an additional

> problem. It appears that these math functions are only available via

> control+e and not in clips?

>

> floor(395/60)=6

> so this does work ... but how do I get it to go in a clip ... if I can?

>

> loro wrote:

>

>> I didn't see this part.

>>

>>

>>>I also find a ROUND function in math help, but again no explaination of

>>>how it works. How might this compare to the rounddown() function in

>>>excel for example? That program offers roundup(), rounddown() and

>>>round().

>>

>>

>> I don't know Excel, but I have a hunch that CEIL and FLOOR correspond to

>> roundup() and rounddown()...

>>

>> Lotta

>>

>>

>>

>>

>>

>> Yahoo! Groups Links

>>

>>

>>

>>

>>

>>

>>

>>

>

>

>

>

> Yahoo! Groups Links

>

>

>

>

>

>

> - Don Passenger wrote:
> I wrote a week or two ago seeking a solution to a problem I had. The

Don,

> list has always been most helpful, but for some reason this time I got

> zero responses, so perhaps I asked the wrong way. So I guess I will try

> something simpler and then piece it together.

>

> If say I take the number 395, I want to divide it by 60 ... and I get

> 6.58333333

> I want to round this down to 6 (ie toss the remainder).

> Is there a math function to do this?

> I suppose if I made it a string I could toss everything including and

> after the period.

I recall you saying you always want to round down to a whole number.

The following 2 operators appear to always give the same result by

rounding down.

^$Calc(FLOOR(395/60))$

^$Calc(INT(395/60);0)$

hrs