Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /src/ov-mp.h [7258ed] .. [214b68] Maximize Restore

  Switch to side-by-side view

--- a/src/ov-mp.h
+++ b/src/ov-mp.h
@@ -76,10 +76,18 @@
   bool is_mp_type (void) const { return true; }
 
   /* instead of downclassing, upclass both arguments */
-  octave_value oct_cmp_proxy (const octave_base_value& a1, const octave_base_value& a2, 
-                                int (*func) (mpfr_srcptr op1, mpfr_srcptr op2));
+  octave_value oct_monocmp_proxy (const octave_mp& a1, 
+                                  int (*func) (mpfr_srcptr op1));
   
-  octave_value oct_binop_proxy (const octave_base_value& a1, const octave_base_value& a2, 
+  octave_value oct_monop_proxy (const octave_mp& a1, 
+                                int (*func) (mpfr_ptr rop, mpfr_srcptr op1, mpfr_rnd_t rnd));
+  
+  octave_value oct_bincmp_proxy (const octave_base_value& a1, 
+                                 const octave_base_value& a2, 
+                                 int (*func) (mpfr_srcptr op1, mpfr_srcptr op2));
+  
+  octave_value oct_binop_proxy (const octave_base_value& a1, 
+                                const octave_base_value& a2, 
                                 int (*func) (mpfr_ptr rop, mpfr_srcptr op1, mpfr_srcptr op2, mpfr_rnd_t rnd));
   
   bool valid_as_scalar_index (void) const
@@ -97,6 +105,9 @@
 
   bool is_true (void) const { return (mpfr_regular_p (scalar)); }
 
+  long int long_value (bool = false) const { return mpfr_get_si (scalar, rnd); }
+  unsigned long int ulong_value (bool = false) const { return mpfr_get_ui (scalar, rnd); }
+  float float_value (bool = false) const { return mpfr_get_flt (scalar, rnd); } 
   double double_value (bool = false) const { return mpfr_get_d (scalar, rnd); }
   
   double mp_value (bool = false) const { return 42; }