|
5.1.35 farey
Syntax:
farey ( bigint_expression , bigint_expression )
farey ( ideal_expression , bigint_expression )
farey ( module_expression , bigint_expression )
farey ( matrix_expression , bigint_expression )
Type:
- type of the first argument
Purpose:
- lift the first argument modulo the second to the rationals.
The (coeffients of the) result a/b is the best approximation under the condition
Note:
- The current coefficient field must be the rationals.
Example:
| ring r=0,x,dp;
farey(2,32003);
==> 2
|
See
chinrem.
|