File: gmp_pp.ml

package info (click to toggle)
ocamlcreal 0.7-4
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 368 kB
  • ctags: 754
  • sloc: ml: 2,699; ansic: 1,067; sh: 113; makefile: 46
file content (12 lines) | stat: -rw-r--r-- 219 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12

open Gmp
open Format

let z z = print_string (Z.string_from z)

let q q = 
  let n = Q.get_num q
  and d = Q.get_den q in
  print_string (Z.string_from n);
  if Z.cmp_si d 1 != 0 then printf "/%s" (Z.string_from d);;