Name:
-
subtraction function
Library names:
sollya_obj_t sollya_lib_sub(sollya_obj_t, sollya_obj_t)
sollya_obj_t sollya_lib_build_function_sub(sollya_obj_t, sollya_obj_t)
#define SOLLYA_SUB(x,y) sollya_lib_build_function_sub((x), (y))
sollya_obj_t sollya_lib_neg(sollya_obj_t)
sollya_obj_t sollya_lib_build_function_neg(sollya_obj_t)
#define SOLLYA_NEG(x) sollya_lib_build_function_neg(x)
Usage:
function1 - function2 : (function, function) -> function
interval1 - interval2 : (range, range) -> range
interval1 - constant : (range, constant) -> range
interval1 - constant : (constant, range) -> range
- function1 : function -> function
- interval1 : range -> range
Parameters:
- function1 and function2 represent functions
- interval1 and interval2 represent intervals (ranges)
- constant represents a constant or constant expression
Description:
- - represents the subtraction (function) on reals.
The expression function1 - function2 stands for
the function composed of the subtraction function and the two
functions function1 and function2, where function1 is
the subtrahend and function2 the subtractor.
- - can be used for interval arithmetic on intervals
(ranges). - will evaluate to an interval that safely
encompasses all images of the subtraction function with arguments varying
in the given intervals. Any combination of intervals with intervals
or constants (resp. constant expressions) is supported. However, it is
not possible to represent families of functions using an interval as
one argument and a function (varying in the free variable) as the
other one.
- - stands also for the negation function.
Example 1:
> 5 - 2;
3
Example 2:
> x - 2;
-2 + x
Example 3:
> x - x;
0
Example 4:
> diff(sin(x) - exp(x));
cos(x) - exp(x)
Example 5:
> [1;2] - [3;4];
[-3;-1]
> [1;2] - 17;
[-16;-15]
> 13 - [-4;17];
[-4;17]
Example 6:
> -exp(x);
-exp(x)
> -13;
-13
> -[13;17];
[-17;-13]
Go back to the list of commands