// This source file is licensed as described in the file COPYING, which
// you should have received as part of this distribution. The terms
// are also available at
-// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
// <-- CLI SHELL MODE -->
// <-- ENGLISH IMPOSED -->
function flag = MY_assert_equal ( computed , expected )
- if computed==expected then
- flag = 1;
- else
- flag = 0;
- end
- if flag <> 1 then bugmes();quit;end
+ if computed==expected then
+ flag = 1;
+ else
+ flag = 0;
+ end
+ if flag <> 1 then bugmes();quit;end
endfunction
format("v",10);
//
-dmax = -log10(2^(-53));
+dmax = -log(2^(-53))/log(10);
//
computed = assert_computedigits ( 1 , 1 );
MY_assert_equal ( computed , dmax );
a = [
3.982729777831130693D-59
2.584939414228211484D-26
-4.391531370352049090D+43
+4.391531370352049090D+43
1.725436586898508346D+68
];
b = [
];
c = assert_computedigits ( a , b , 2 );
e = [
- 53.
- 53.
- 51.977632
- 51.678072
+53.
+53.
+51.977632
+51.678072
];
assert_checkalmostequal ( c , e , 1.e-7 );
//
-// Check that the vectorization was correct, i.e. no specific
+// Check that the vectorization was correct, i.e. no specific
// case in the processing of the data is forgotten.
//
function pI = permInverse(p)
- // Given the permutation p, compute the
+ // Given the permutation p, compute the
// inverse permutation pI.
N = size(p,"*")
pI(p) = (1:N)'