Revision 8d164031 src/backends/C/c_backend_common.ml
src/backends/C/c_backend_common.ml | ||
---|---|---|
723 | 723 |
pp_file fmt "i" var_id |
724 | 724 |
) |
725 | 725 |
else if Types.is_real_type unclocked_t then |
726 |
let _ = |
|
727 |
if !Options.mpfr then |
|
728 |
fprintf fmt "_put_double(\"%s\", mpfr_get_d(%s, %s), %i);@ " name var_id (Mpfr.mpfr_rnd ()) !Options.print_prec_double |
|
729 |
else |
|
730 |
fprintf fmt "_put_double(\"%s\", %s, %i);@ " name var_id !Options.print_prec_double |
|
731 |
in |
|
732 |
pp_file fmt ".*f" ((string_of_int !Options.print_prec_double) ^ ", " ^ var_id) |
|
726 |
|
|
727 |
if !Options.mpfr then ( |
|
728 |
fprintf fmt "_put_double(\"%s\", mpfr_get_d(%s, %s), %i);@ " name var_id (Mpfr.mpfr_rnd ()) !Options.print_prec_double; |
|
729 |
pp_file fmt ".*f" ((string_of_int !Options.print_prec_double) ^ ", mpfr_get_d(" ^ var_id ^ ", MPFR_RNDN)") |
|
730 |
) |
|
731 |
else ( |
|
732 |
fprintf fmt "_put_double(\"%s\", %s, %i);@ " name var_id !Options.print_prec_double; |
|
733 |
pp_file fmt ".*f" ((string_of_int !Options.print_prec_double) ^ ", " ^ var_id) |
|
734 |
) |
|
735 |
|
|
733 | 736 |
else |
734 | 737 |
(Format.eprintf "Impossible to print the _put_xx for type %a@.@?" Types.print_ty var_type; assert false) |
735 | 738 |
|
Also available in: Unified diff