Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.advocacy > #456403

linking sc to libgmp

From owl <owl@rooftop.invalid>
Newsgroups comp.os.linux.advocacy
Subject linking sc to libgmp
Date 2018-06-25 14:55 +0000
Organization O.W.L.
Message-ID <xl9080ab3.aghou3@rooftop.invalid> (permalink)

Show all headers | View raw


Finally figured out how to create a built-in arbitrary precision
addition function for sc.  This first attempt simply adds two cells.

https://pewtube.com/user/owl/pdscsXX?autoplay=off

Because sc's internal floating-point representation is a double, and
therefore limited to that precision, the numbers for arbitrary precision
math must entered as strings, with the function returning a string.

The function itself was easy enough, but figuring out how to get
sc to save it took a lot of digging through the code.  Damn.

I still need to get it working for a range.  At some point, I may
switch from libgmp to libmpfr, since that has "correct rounding"
and will hopefully eliminate the need to specify the number of zeros 
in the output.

https://gmplib.org/
https://www.mpfr.org/

Back to comp.os.linux.advocacy | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

linking sc to libgmp owl <owl@rooftop.invalid> - 2018-06-25 14:55 +0000
  Re: linking sc to libgmp Steve Carroll <fretwizzer@gmail.com> - 2018-06-25 13:10 -0700
    Re: linking sc to libgmp owl <owl@rooftop.invalid> - 2018-06-25 21:20 +0000
      Re: linking sc to libgmp Steve Carroll <fretwizzer@gmail.com> - 2018-06-25 14:33 -0700
        Re: linking sc to libgmp owl <owl@rooftop.invalid> - 2018-06-25 21:48 +0000
          Re: linking sc to libgmp Steve Carroll <fretwizzer@gmail.com> - 2018-06-25 14:56 -0700
            Re: linking sc to libgmp owl <owl@rooftop.invalid> - 2018-06-25 22:17 +0000
              Re: linking sc to libgmp Steve Carroll <fretwizzer@gmail.com> - 2018-06-25 15:23 -0700
                Re: linking sc to libgmp owl <owl@rooftop.invalid> - 2018-06-25 22:48 +0000
                Re: linking sc to libgmp Steve Carroll <fretwizzer@gmail.com> - 2018-06-26 08:11 -0700

csiph-web