On 04/27/2012 07:24 PM, Jussi Lahtinen wrote:
> At least the problem is unrelated to sin and cos...
>
> ? format(0.47942553860420300027 ^ 2 -
> 0.22984884706593014129,"#.##")
> - .0012212453
>
> ? format(0.47942553860420300027 ^ 2.0 - 0.22984884706593014129
> ,"#.###
Everything seems to work now!
Jussi
On Sat, Apr 28, 2012 at 18:11, Benoît Minisini wrote:
> Le 28/04/2012 04:52, Benoît Minisini a écrit :
> > Le 28/04/2012 01:24, Jussi Lahtinen a écrit :
> >> At least the problem is unrelated to sin and cos...
> >>
> >> ? format(0.47942553860420300027 ^ 2 -
Le 28/04/2012 04:52, Benoît Minisini a écrit :
> Le 28/04/2012 01:24, Jussi Lahtinen a écrit :
>> At least the problem is unrelated to sin and cos...
>>
>> ? format(0.47942553860420300027 ^ 2 -
>> 0.22984884706593014129,"#.##")
>> - .0012212453
>>
>> ? format(0.47942
Le 28/04/2012 01:24, Jussi Lahtinen a écrit :
> At least the problem is unrelated to sin and cos...
>
> ? format(0.47942553860420300027 ^ 2 -
> 0.22984884706593014129,"#.##")
> - .0012212453
>
> ? format(0.47942553860420300027 ^ 2.0 - 0.22984884706593014129
> ,"#.###
At least the problem is unrelated to sin and cos...
? format(0.47942553860420300027 ^ 2 -
0.22984884706593014129,"#.##")
- .0012212453
? format(0.47942553860420300027 ^ 2.0 - 0.22984884706593014129
,"#.##")
- .0011379786
Jussi
Le 27/04/2012 20:44, Jussi Lahtinen a écrit :
> If Sin(0.5) ^ 2 + Cos(0.5) ^ 2<> 1 Then
> Print "This shouldn't be seen, but it is."
> Endif
>
>
> ? format((Sin(0.5) ^ 2 + Cos(0.5) ^ 2),"#.")
> 1
>
> What is going on?
>
>
> Jussi
>
It's very strange actually.
There is opt
messy over many calculations.
-Nando
-- Original Message ---
From: Jussi Lahtinen
To: mailing list for gambas users
Sent: Fri, 27 Apr 2012 21:44:08 +0300
Subject: Re: [Gambas-user] gb3: incorrect solution to If...Then condition
> If Sin(0.5) ^ 2 + Cos(0.5) ^ 2 <> 1
If Sin(0.5) ^ 2 + Cos(0.5) ^ 2 <> 1 Then
Print "This shouldn't be seen, but it is."
Endif
? format((Sin(0.5) ^ 2 + Cos(0.5) ^ 2),"#.")
1
What is going on?
Jussi
2012/4/27 Benoît Minisini
> Le 27/04/2012 05:08, Kevin Fishburne a écrit :
> > I'm using the latest b
Le 27/04/2012 05:08, Kevin Fishburne a écrit :
> I'm using the latest build and have this code:
>
> If Zoom.Adjustment * 0.5>= Zoom.Maximum Then
> Zoom.Adjustment = Zoom.Adjustment * 0.5
> Endif
>
> Zoom.Adjustment and Zoom.Maximum are both singles. Zoom.Adjustment is 1
> and Zoom.Max
I'm using the latest build and have this code:
If Zoom.Adjustment * 0.5 >= Zoom.Maximum Then
Zoom.Adjustment = Zoom.Adjustment * 0.5
Endif
Zoom.Adjustment and Zoom.Maximum are both singles. Zoom.Adjustment is 1
and Zoom.Maximum is 0.5. The expression with these values returns False,
10 matches
Mail list logo