Hello Lester,

> De : Lester Anderson
> Envoyé : mercredi 29 décembre 2021 09:00
>
> Have adapted existing Matlab code for Scilan to calculate Bernoulli
> numbers using an explicit formula [...]  11 onwards the values are incorrect:

I don't know what you already investigated but did you consider the possibility 
of overflow or underflow?

You may already know these documents but if need be:

Michaël Baudin, /Scilab is not naïve/, 2010 
https://www.scilab.org/sites/default/files/scilabisnotnaive.pdf

Michaël Baudin, /Floating point numbers in Scilab/, 2011 
https://www.scilab.org/sites/default/files/floatingpoint-so_v0.4.pdf

Concerning the binomial coefficient, you should maybe use

binomial(p, k)($)

Hope this helps

Regards


--
Christophe Dang Ngoc Chan
Mechanical calculation engineer


General
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error), please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden.
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to