[seed] [mpfr] Added mpfr.subnormalize
- From: Tim Horton <hortont src gnome org>
- To: svn-commits-list gnome org
- Subject: [seed] [mpfr] Added mpfr.subnormalize
- Date: Thu, 9 Jul 2009 01:48:18 +0000 (UTC)
commit 5f7e61f5c3710a2e8b91a635ad1eb56a7067f352
Author: Matt ARSENAULT <arsenm2 rpi edu>
Date: Wed Jul 8 17:54:16 2009 -0400
[mpfr] Added mpfr.subnormalize
modules/mpfr/seed-mpfr.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/modules/mpfr/seed-mpfr.c b/modules/mpfr/seed-mpfr.c
index 2c2ab44..f85ba8f 100644
--- a/modules/mpfr/seed-mpfr.c
+++ b/modules/mpfr/seed-mpfr.c
@@ -912,6 +912,29 @@ gboolean seed_mpfr_set_erangeflag (SeedContext ctx,
return setorclear;
}
+static SeedValue
+seed_mpfr_subnormalize (SeedContext ctx,
+ SeedObject function,
+ SeedObject this_object,
+ gsize argument_count,
+ const SeedValue args[],
+ SeedException * exception)
+{
+ mpfr_rnd_t rnd;
+ mpfr_ptr rop;
+ gint ret, t;
+
+ CHECK_ARG_COUNT("mpfr.subnormalize", 2);
+
+ rop = seed_object_get_private(this_object);
+ rnd = seed_value_to_mpfr_rnd_t(ctx, args[1], exception);
+ t = seed_value_to_int(ctx, args[0], exception);
+
+ ret = mpfr_subnormalize(rop, t, rnd);
+
+ return seed_value_from_int(ctx, ret, exception);
+}
+
seed_static_value mpfr_ns_values[] =
{
{"default_rounding_mode", seed_mpfr_get_default_rounding_mode, seed_mpfr_set_default_rounding_mode, SEED_PROPERTY_ATTRIBUTE_DONT_DELETE},
@@ -1041,6 +1064,7 @@ seed_static_function mpfr_funcs[] =
{"pi", seed_mpfr_const_pi, 0},
{"euler", seed_mpfr_const_euler, 0},
{"catalan", seed_mpfr_const_catalan, 0},
+ {"subnormalize", seed_mpfr_subnormalize, 0},
{NULL, NULL, 0}
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]