- function represents the function to be considered
- start represents a value around which the search is to be performed
- preimage precision represents the precision (discretization) for the eligible preimage values
- steps represents the binary logarithm (log2) of the number of search steps to be performed
- format represents the format the image of the function is to be rounded to
- error bound represents a upper bound on the relative rounding error when rounding the image
- list of functions represents the functions to be considered
- list of formats represents the respective formats the images of the functions are to be rounded to
- list of error bounds represents a upper bound on the relative rounding error when rounding the image

- The command searchgal searches for a preimage z of function
function or a list of functions list of functions such that
z is a floating-point number with preimage precision
significant mantissa bits and the image y of the function,
respectively each image yi of the functions, rounds to
format format respectively to the corresponding format in list of format
with a relative rounding error less than error bound
respectively the corresponding value in list of error bounds. During
this search, at most 2^steps attempts are made. The search
starts with a preimage value equal to start. This value is then
increased and decreased by 1 ulp in precision preimage precision
until a value is found or the step limit is reached.

If the search finds an appropriate preimage z, searchgal evaluates to a list containing this value. Otherwise, searchgal evaluates to an empty list.

[| |]

> searchgal(log(x),2,53,18,DD,1b-112);

[|2.0000000000384972054234822280704975128173828125|]

> 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 )

[|1.00000000000159494639717649988597258925437927246094|]