Skip to content

Commit

Permalink
Merge branch 'evals' of https://github.com/rajithv/symengine.rb into …
Browse files Browse the repository at this point in the history
…evals
  • Loading branch information
rajithv committed Jul 8, 2016
2 parents c7ef759 + bb29a1b commit cc88799
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions ext/symengine/ruby_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,13 @@ VALUE cutils_evalf(VALUE self, VALUE operand, VALUE prec, VALUE real)
{
VALUE result;

basic_struct *cbasic_operand;
basic_struct *cresult;
cbasic_operand = basic_new_heap();
cresult = basic_new_heap();

sympify(operand, cbasic_operand);
basic_evalf(cresult, cbasic_operand, NUM2INT(prec),
(real == Qtrue ? 1 : 0));
sympify(operand, cresult);
basic_evalf(cresult, cresult, NUM2INT(prec), (real == Qtrue ? 1 : 0));
result = Data_Wrap_Struct(Klass_of_Basic(cresult), NULL, cbasic_free_heap,
cresult);

cbasic_free_heap(cbasic_operand);

return result;
}

0 comments on commit cc88799

Please sign in to comment.