Fixed.

Added licence header.
Added C version of Priest.

Fixed Stewart algorithm, with Corrigendum from TOMS/1986.

Added variants.

Improved random search.

Random search.

Added search algorithm for failures.

Just updated month.

Fixed unit tests for Smith #5 and #6.

Added difficult cases for Smith's algorithm.

Added a new failure mode for Smith's algorithm.

Tested Li's algo.

scilabisnotnaive_v2.2.pdf - 534.16 kB

Most of the time, the mathematical formula is directly used in the Scilab source code. But, in many algorithms, some additional work is performed, which takes into account the fact that the computer does not process mathematical real values, but performs computations with their floating point representation. The goal of this article is to show that, in many situations, Scilab is not naive and use algorithms which have been specifically tailored for floating point computers. We analyze in this article the particular case of the quadratic equation, the complex division and the numerical derivatives. In each example, we show that the naive algorithm is not sufficiently accurate, while Scilab implementation is much more robust.

This is an updated version with many exercises.

Added open-source notes.

scilabisnotnaive_v2.1.pdf - 531.74 kB

Most of the time, the mathematical formula is directly used in the Scilab source code. But, in many algorithms, some additional work is performed, which takes into account the fact that the computer does not process mathematical real values, but performs computations with their floating point representation. The goal of this article is to show that, in many situations, Scilab is not naive and use algorithms which have been specifically tailored for floating point computers. We analyze in this article the particular case of the quadratic equation, the complex division and the numerical derivatives. In each example, we show that the naive algorithm is not sufficiently accurate, while Scilab implementation is much more robust.

This is an updated version with many exercises.

Fixed typo.

Added Li's algorithm.
Added comments in references for complex division.

Updated references.

Updated script.
Updated prodminmax.

scilabisnotnaive-2.0.2.pdf - 524.68 kB

Abstract

Most of the time, the mathematical formula is directly used in the Scilab source code. But, in many algorithms, some additional work is performed, which takes into account the fact that the computer does not process mathematical real values, but performs computations with their floating point representation. The goal of this article is to show that, in many situations, Scilab is not naive and use algorithms which have been specifically tailored for floating point computers. We analyze in this article the particular case of the quadratic equation, the complex division and the numerical derivatives. In each example, we show that the naive algorithm is not sufficiently accurate, while Scilab implementation is much more robust.

This is an updated version with many exercises.