[scilab-Users] Weird acos values ( deals with rounding precision)

François Vogel fvogelnew1 at free.fr
Tue Dec 23 09:43:07 CET 2008


It would be such a relief if you would turn your text below into a FAQ 
page on the wiki so that we could point users to that page whenever 
they complain that 1.2D-19 is not zero, which happens twice a week or 
so...

Would you do that for the community? Please keep the stamp "Best 
viewed with a brain", it's so true (and btw I can't believe that the 
original post starts with "one of our student found that..." - Is this 
a report from a teacher, then???).

http://wiki.scilab.org/

IMHO a FAQ page would fit nicely in the "Scilab documentation" 
sub-area (upper left tile of the table in the above page).

Do you take it?

Francois


michel.marzin at ext.mpsa.com said on 23/12/2008 08:47:
> Hi,
>  
> -->a=(0.5*44100)/343
>  a  =
>     64.285714
> -->b=(a/44100)*343
>  b  =
>     0.5
> -->b-0.5
>  ans  =
>     1.110D-16
>  
> Result isn't exact and it's weird if we expect "perfection" from computers.
>  
>  From a "mathematical" point of view, yes, it's weird.
>  From a more "technical" point of view ( my point of view), you have to 
> deals with precision when you do some measurements
> on parts, so the only question i ask is : do i have enought precision in 
> my computation to manage these results.
>  
> if you manage "sounds" ( 44100 ?!!), do you need a perfect 
> "mathematical" result ?
>  
> Rounding error isn't a Scilab particularity.
> All compu sion"
>  
> when i deals with stress and strain, i don't need to have more than 1d-3 
> of precision on results
> so computation on 1d-8 data is sufficient for me, FEA software deals 
> with that precision ( sometimes less)
>  
> It's a great concept to teach to student, a base in numerical analysis.
> "Don't expect perfection from codes."
>  
> You can do computation on great clusters, on supercomputer, on your home 
> computer.
> these machines don't forget data, unlike YOU
> these machines can compute faster than YOU
> these machine have more memory than YOU
> but
> YOU feed the machine with data
> YOU feed the machine with code
> YOU know that perfection doesn't exist ( except me of course ;-))
> YOU know that you can make mistakes
> the machine don't know that.
>  
> Then lesson is : Be Smart.
> Smar >Smart in your "data feeding"
> Smart in your needs
>  
> The machine can't be smart for you.
> So on some reports, we should stamp " Best viewed with a brain"
>  
> regards,
> ----------------------------------------------------------------------
> Michel
>  
> PS : Easy to say, i have to confess that i'm not the last to complain 
> about computer.
> Please Santa give me a better computer.
> i don't need a better brain, i'm perfect ;-)) 



More information about the users mailing list