Name:
+
addition function
Library names:
sollya_obj_t sollya_lib_add(sollya_obj_t, sollya_obj_t)
sollya_obj_t sollya_lib_build_function_add(sollya_obj_t, sollya_obj_t)
#define SOLLYA_ADD(x,y) sollya_lib_build_function_add((x), (y))
Usage:
function1 + function2 : (function, function) -> function
interval1 + interval2 : (range, range) -> range
interval1 + constant : (range, constant) -> range
interval1 + constant : (constant, range) -> range
Parameters:
- function1 and function2 represent functions
- interval1 and interval2 represent intervals (ranges)
- constant represents a constant or constant expression
Description:
- + represents the addition (function) on reals.
The expression function1 + function2 stands for
the function composed of the addition function and the two
functions function1 and function2.
- + can be used for interval arithmetic on intervals
(ranges). + will evaluate to an interval that safely
encompasses all images of the addition 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.
Example 1:
> 1 + 2;
3
Example 2:
> x + 2;
2 + x
Example 3:
> x + x;
x * 2
Example 4:
> diff(sin(x) + exp(x));
cos(x) + exp(x)
Example 5:
> [1;2] + [3;4];
[4;6]
> [1;2] + 17;
[18;19]
> 13 + [-4;17];
[9;30]
Go back to the list of commands