File: gmp_pp.ml

package info (click to toggle)
ocamlcreal 0.7-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, squeeze, stretch, wheezy
  • size: 384 kB
  • ctags: 751
  • sloc: ml: 2,699; ansic: 1,067; makefile: 15
file content (12 lines) | stat: -rw-r--r-- 219 bytes parent folder | download | duplicates (4)
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);;