[seed] [mpfr] Added mpfr.greater_p
- From: Tim Horton <hortont src gnome org>
- To: svn-commits-list gnome org
- Subject: [seed] [mpfr] Added mpfr.greater_p
- Date: Sun, 5 Jul 2009 19:09:19 +0000 (UTC)
commit 5776376b8879038f7f18f5fd5e76b320349772b0
Author: Matt ARSENAULT <arsenm2 rpi edu>
Date: Sun Jul 5 12:08:03 2009 -0400
[mpfr] Added mpfr.greater_p
modules/mpfr/seed-mpfr-cmp.c | 28 ++++++++++++++++++++++++++++
modules/mpfr/seed-mpfr.c | 1 +
modules/mpfr/seed-mpfr.h | 2 ++
3 files changed, 31 insertions(+), 0 deletions(-)
---
diff --git a/modules/mpfr/seed-mpfr-cmp.c b/modules/mpfr/seed-mpfr-cmp.c
index 970f843..dc74e35 100644
--- a/modules/mpfr/seed-mpfr-cmp.c
+++ b/modules/mpfr/seed-mpfr-cmp.c
@@ -138,3 +138,31 @@ seed_mpfr_zero_p (SeedContext ctx,
return seed_value_from_boolean(ctx, ret, exception);
}
+SeedValue seed_mpfr_greater_p (SeedContext ctx,
+ SeedObject function,
+ SeedObject this_object,
+ gsize argument_count,
+ const SeedValue args[],
+ SeedException * exception)
+{
+ mpfr_ptr rop, op;
+ gboolean ret;
+
+ CHECK_ARG_COUNT("mpfr.greater_p", 1);
+
+ rop = seed_object_get_private(this_object);
+
+ if ( seed_value_is_object_of_class(ctx, args[0], mpfr_class) )
+ {
+ op = seed_object_get_private(args[0]);
+ }
+ else
+ {
+ TYPE_EXCEPTION("mpfr.greater_p", "mpfr_t");
+ }
+
+ ret = mpfr_greater_p(rop, op);
+
+ return seed_value_from_boolean(ctx, ret, exception);
+}
+
diff --git a/modules/mpfr/seed-mpfr.c b/modules/mpfr/seed-mpfr.c
index 854959a..2cb1ab6 100644
--- a/modules/mpfr/seed-mpfr.c
+++ b/modules/mpfr/seed-mpfr.c
@@ -632,6 +632,7 @@ seed_static_function mpfr_funcs[] =
{"swap", seed_mpfr_swap, 0},
{"cmp", seed_mpfr_cmp, 0},
{"cmpabs", seed_mpfr_cmpabs, 0},
+ {"greater_p", seed_mpfr_greater_p, 0},
{"nan_p", seed_mpfr_nan_p, 0},
{"inf_p", seed_mpfr_inf_p, 0},
{"number_p", seed_mpfr_number_p, 0},
diff --git a/modules/mpfr/seed-mpfr.h b/modules/mpfr/seed-mpfr.h
index 8212ae4..a9a4d95 100644
--- a/modules/mpfr/seed-mpfr.h
+++ b/modules/mpfr/seed-mpfr.h
@@ -95,5 +95,7 @@ DEF_SEED_MPFR_FUNC(seed_mpfr_inf_p);
DEF_SEED_MPFR_FUNC(seed_mpfr_number_p);
DEF_SEED_MPFR_FUNC(seed_mpfr_zero_p);
+DEF_SEED_MPFR_FUNC(seed_mpfr_greater_p);
+
#endif /* _SEED_MFPR_H_ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]