[Gambas-user] Arithmetic failure in project

Jean-Yves F. Barbier 12ukwn at ...626...
Mon Sep 21 21:38:09 CEST 2009


Horst Günther Burkhardt III a écrit :
> I'm building a basic flash exposure calculator with floats and extremely
> precise arithmetic, to benefit those of us who happen to list
> photography among our hobbies ;)
> 
> Unfortunately, I've run into several issues with the code. 
> 
> The foremost of which: no matter the data that is plugged in, the result
> is always 0. 
> 
> Also, my case construct for power adjustment is ... considerably failed.
> 
> Attached are my .form .class and a screenshot of the result i get.
unusable, send the whole project instead.

Your example isn't relevant: @53m with a 25ASA film and a 50mm, you'll need
many more than 8 flash lights to get the amount of light required.
(or a diaf @... 0.5)

As far as I see, it may be result that is cast into an integer instead of a float,
use float everywhere to see.

Also you must recompute the NG if you don't have walls that reflect the flash light(s)
and if the reflexion coeff is different from 18% (NG base computation conditions & K).

JY
-- 
Ankh if you love Isis.




More information about the User mailing list