## Name:

pi the constant Pi.

## Library names:

sollya_obj_t sollya_lib_pi() int sollya_lib_is_pi(sollya_obj_t) sollya_obj_t sollya_lib_build_function_pi() #define SOLLYA_PI (sollya_lib_build_function_pi())

## Description:

• pi is the constant Pi, defined as half the period of sine and cosine.
• In Sollya, pi is considered a 0-ary function. This way, the constant is not evaluated at the time of its definition but at the time of its use. For instance, when you define a constant or a function relating to Pi, the current precision at the time of the definition does not matter. What is important is the current precision when you evaluate the function or the constant value.
• Remark that when you define an interval, the bounds are first evaluated and then the interval is defined. In this case, pi will be evaluated as any other constant value at the definition time of the interval, thus using the current precision at this time.

## Example 1:

> verbosity=1!; prec=12!;
> a = 2*pi;
> a;
Warning: rounding has happened. The value displayed is a faithful rounding to 12 bits of the true result.
6.283
> prec=20!;
> a;
Warning: rounding has happened. The value displayed is a faithful rounding to 20 bits of the true result.
6.28319

## Example 2:

> display=binary;
Display mode is binary numbers.
> prec=12!;
> d = [pi; 5];
> d;
[1.1001001_2 * 2^(1);1.01_2 * 2^(2)]
> prec=20!;
> d;
[1.1001001_2 * 2^(1);1.01_2 * 2^(2)]