pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: A Z <poweruserm@live.com.au>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Serious Assistance with PostgreSQL True Infinite Arbitrary Precision Maths.
Date: Thu, 12 Aug 2021 02:54:03 +0000
Message-ID: <PSXP216MB0085760D0FCA442A1D4974769AF99@PSXP216MB0085.KORP216.PROD.OUTLOOK.COM> (raw)

Dear pgsql-general,

I'm after Infinite Precision Integer (ii) or Infinite Precision Rational (ir)
type and function support for PostgreSQL, as an easy installation
for two new native types.  That are available under free
and open source conditions, for public, private and commercial, free
use.

I am aware of the pgmp project.  While I have contacted it and and am
awaiting their response, it is the case that the present state of pgmp
is not enough for my needs.

PostgreSQL does not have a private doubly linked list available,
and so I can't assemble all this for myself, given that I do not
know enough about PostgreSQL extensions and the C language.

What I am after is True Arbitrary Precision Arithmetic, and not High Precision
Arithmetic.  What I seek would be contingent only upon available OS or Hardware
memory.

I need arithmetic and comparison support on Integer and Rational (Decimal type)
numbers.  +, -, *,/,%, ==, !=, <>,>,<, >=, <=. Other important candidates required
include +=, -=, *=, /=, %=.

The trick is, that I also need full classical function support as well.  What I need
fairly well is:

cast(ir) returns double precision;
cast(double precision) returns ir;
cast(ir) returns real;
cast(real) return ir;
cast(ir) returns numeric;
cast(numeric) returns ir;
cast(ir) returns decimal;
cast(decimal) returns ir;
cast(ii) returns bigserial;
cast(bigserial) returns ii;
cast(ii) returns serial;
cast(serial) returns ii;
cast(ii) returns smallserial;
cast(smallserial) returns ii;
cast(ii) returns bigint;
cast(bigint) returns ii;
cast(ii) returns integer;
cast(integer) returns ii;
cast(ii) returns smallint;
cast(smallint) returns ii;

cast(text as ii) returns ii;
cast(text as ir) returns ir;
cast(ir as text) returns text;
cast(ii as text) returns text;
cast(ii as ir) returns ir;
cast(ir as ii) returns ii;

sign(ir input) returns ir;
abs(ir input) returns ir;
pi(ii places) returns ir;
e(ii places) returns ir;
power(ir base, ir exponent) returns ir;
sqrt(ir input) returns ir
nroot(ii theroot, ir input) returns ir;
log10(ir input) returns ir;
loge(ir input) returns ir;
log2(ir input) returns ir;
factorial(ii input) returns ii;
degrees(ir input) returns ir;
radians(ir input) returns it;

sind(ir input) returns ir;
cosd(ir input) returns ir;
tand(ir input) returns ir;
asind(ir input) returns ir;
acosd(ir input) returns ir;
atand(ir input) returns ir;

sinr(ir input) returns ir;
cosr(ir input) returns ir;
tanr(ir input) returns ir;
asinr(ir input) returns ir;
acosr(ir input) returns ir;
atanr(ir input) returns ir;

The last two sets of functions are forward and inverse trigonometry functions,
both in degrees and radians.

I also need the update module to install easily.  A windows *.exe and *.msi,
a Linux *.deb, *.rpm or *.bin.

Is there someone or something out there that can get there?

view thread (5+ messages)  latest in thread

Message-ID: <PSXP216MB0085760D0FCA442A1D4974769AF99@PSXP216MB0085.KORP216.PROD.OUTLOOK.COM>
Permalink:  ../PSXP216MB0085760D0FCA442A1D4974769AF99@PSXP216MB0085.KORP216.PROD.OUTLOOK.COM/
Also on:    postgresql.org/message-id/PSXP216MB0085760D0FCA442A1D4974769AF99@PSXP216MB0085.KORP216.PROD.OUTLOOK.COM

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: poweruserm@live.com.au
  Subject: Re: Serious Assistance with PostgreSQL True Infinite Arbitrary Precision Maths.
  In-Reply-To: <PSXP216MB0085760D0FCA442A1D4974769AF99@PSXP216MB0085.KORP216.PROD.OUTLOOK.COM>
  References: <PSXP216MB0085760D0FCA442A1D4974769AF99@PSXP216MB0085.KORP216.PROD.OUTLOOK.COM>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox