Skip to content
Snippets Groups Projects
Commit e5d77428 authored by Pierre Loic Garoche's avatar Pierre Loic Garoche
Browse files

Solved issue btw mpfr and conv functions (int_to_real was not handled)

parent dc732cf2
No related branches found
No related tags found
No related merge requests found
function real_to_int (in1: real) returns (out: int) prototype C;
function _Floor (in1: real) returns (out: int) prototype C;
function _floor (in1: real) returns (out: real) prototype C;
function _Ceiling (in1: real) returns (out: int) prototype C;
function _ceil (in1: real) returns (out: real) prototype C;
function _Round (in1: real) returns (out: int) prototype C;
function _round (in1: real) returns (out: real) prototype C;
function int_to_real (in1: int) returns (out: real) prototype C;
function _Floor (in1: real) returns (out: int) prototype C lib m;
function _floor (in1: real) returns (out: real) prototype C lib m;
function _Ceiling (in1: real) returns (out: int) prototype C lib m;
function _ceil (in1: real) returns (out: real) prototype C lib m;
function _Round (in1: real) returns (out: int) prototype C lib m;
function _round (in1: real) returns (out: real) prototype C lib m;
......@@ -95,6 +95,12 @@ void MPFRClear(mpfr_t i)
mpfr_clear(i);
}
// functions of conv
void MPFRint_to_real_step (int i, mpfr_t out)
{
mpfr_set_si(out, i, MPFR_RNDN);
}
// functions of lustrec_math
void MPFRacos_step (mpfr_t i,
mpfr_t out
......
......@@ -20,6 +20,9 @@ function MPFREq(i1, i2: real) returns (out: bool);
function MPFRNeq(i1, i2: real) returns (out: bool);
-- Functions already available in conv
function MPFRint_to_real (x: int) returns (y: real);
-- Functions already available in lustrec_math
function MPFRacos (x: real) returns (y: real) ;
......
......@@ -97,6 +97,8 @@ let base_inject_op id =
| ">" -> "MPFRGt"
| "=" -> "MPFREq"
| "!=" -> "MPFRNeq"
(* Conv functions *)
| "int_to_real" -> "MPFRint_to_real"
(* Math library functions *)
| "acos" -> "MPFRacos"
| "acosh" -> "MPFRacosh"
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment