Name:

dirtyinfnorm computes a numerical approximation of the infinity norm of a function on an interval.

Library name:

sollya_obj_t sollya_lib_dirtyinfnorm(sollya_obj_t, sollya_obj_t)

Usage:

dirtyinfnorm(f,I) : (function, range) -> constant

Parameters:

• f is a function.
• I is an interval.

Description:

• dirtyinfnorm(f,I) computes an approximation of the infinity norm of the given function f on the interval I, e.g. max {|f(x)|, x in I}.
• The interval must be bound. If the interval contains one of -Inf or +Inf, the result of dirtyinfnorm is NaN.
• The result of this command depends on the global variables prec and points. Therefore, the returned result is generally a good approximation of the exact infinity norm, with precision prec. However, the result is generally underestimated and should not be used when safety is critical. Use infnorm instead.
• The following algorithm is used: let n be the value of variable points and t be the value of variable prec.
• Evaluate |f| at n evenly distributed points in the interval I. The evaluation are faithful roundings of the exact results at precision t.
• Whenever the derivative of f changes its sign for two consecutive points, find an approximation x of its zero with precision t. Then compute a faithful rounding of |f(x)| at precision t.
• Return the maximum of all computed values.

Example 1:

> dirtyinfnorm(sin(x),[-10;10]);
1

Example 2:

> prec=15!;
> dirtyinfnorm(exp(cos(x))*sin(x),[0;5]);
1.45856
> prec=40!;
> dirtyinfnorm(exp(cos(x))*sin(x),[0;5]);
1.458528537136
> prec=100!;
> dirtyinfnorm(exp(cos(x))*sin(x),[0;5]);
1.458528537136237644438147455025
> prec=200!;
> dirtyinfnorm(exp(cos(x))*sin(x),[0;5]);
1.458528537136237644438147455023841718299214087993682374094153

Example 3:

> dirtyinfnorm(x^2, [log(0);log(1)]);
NaN