Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
rat_of_term : term -> num
SYNOPSIS
Converts a canonical rational literal of type :real to an OCaml number.
DESCRIPTION
The call rat_of_term t where term t is a canonical rational literal of type
:real returns the corresponding OCaml rational number (type num). The
canonical literals are integer literals &n for numeral n, -- &n for a
nonzero numeral n, or ratios &p / &q or -- &p / &q where p is nonzero,
q > 1 and p and q share no common factor.
FAILURE CONDITIONS
Fails when applied to a term that is not a canonical rational literal.
EXAMPLE
# rat_of_term `-- &22 / &7`;;
val it : num = -22/7