[seed] [mpfr] Added mpfr.set_nan



commit 3ccb5d97b96d995ea7248ad0de2919f100a1ff01
Author: Matt ARSENAULT <arsenm2 rpi edu>
Date:   Sun Jul 5 11:13:51 2009 -0400

    [mpfr] Added mpfr.set_nan

 modules/mpfr/seed-mpfr.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/modules/mpfr/seed-mpfr.c b/modules/mpfr/seed-mpfr.c
index de4c1af..a382fed 100644
--- a/modules/mpfr/seed-mpfr.c
+++ b/modules/mpfr/seed-mpfr.c
@@ -243,8 +243,23 @@ SeedValue seed_mpfr_set_inf (SeedContext ctx,
     return seed_make_null(ctx);
 }
 
+SeedValue seed_mpfr_set_nan (SeedContext ctx,
+                             SeedObject function,
+                             SeedObject this_object,
+                             gsize argument_count,
+                             const SeedValue args[],
+                             SeedException * exception)
+{
+    mpfr_ptr rop;
+
+    CHECK_ARG_COUNT("mpfr.set_nan", 0);
+
+    rop = seed_object_get_private(this_object);
 
+    mpfr_set_nan(rop);
 
+    return seed_make_null(ctx);
+}
 
 
 /* init and set functions, using default precision, or optionally specifying it */
@@ -386,6 +401,7 @@ seed_static_function mpfr_funcs[] =
     {"atanh", seed_mpfr_atanh, 0},
     {"set", seed_mpfr_set, 0},
     {"set_inf", seed_mpfr_set_inf, 0},
+    {"set_nan", seed_mpfr_set_nan, 0},
     {"out_str", seed_mpfr_out_str, 0},
     {"pi", seed_mpfr_const_pi, 0},
     {"euler", seed_mpfr_const_pi, 0},



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]