Name:

searchgal searches for a preimage of a function such that the rounding the image yields an error smaller than a constant

Usage:

searchgal(function, start, preimage precision, steps, format, error bound) : (function, constant, integer, integer, D|double|DD|doubledouble|DE|doubleextended|TD|tripledouble, constant) -> list searchgal(list of functions, start, preimage precision, steps, list of format, list of error bounds) : (list, constant, integer, integer, list, list) -> list

Parameters:

Description:

Example 1:

   > searchgal(log(x),2,53,15,DD,1b-112);
   [| |]
   > searchgal(log(x),2,53,18,DD,1b-112);
   [|2.0000000000384972054234822280704975128173828125|]

Example 2:

   > f = exp(x);
   > s = searchgal(f,2,53,18,DD,1b-112);
   > if (s != [||]) then {
   >    v = s[0];
   >    print("The rounding error is 2^(",evaluate(log2(abs(DD(f)/f - 1)),v),")");
   > } else print("No value found");
   The rounding error is 2^( -1.12106878438809380148206984258358542322113874177832e2 )

Example 3:

   > searchgal([|sin(x),cos(x)|],1,53,15,[|D,D|],[|1b-62,1b-60|]);
   [|1.00000000000159494639717649988597258925437927246094|]
See also: round, double, doubledouble, tripledouble, evaluate, worstcase
Go back to the list of commands