C language binding of P1888 operations, especially min and max
I'm trying to create a C language binding of P1788 operations.
I assume two 754-conforming datatypes: b32 and b64.
https://java.net/projects/jinterval/sources/svn/content/trunk/jinterval/p1788-launcher-java/src/main/resources/net/java/jinterval/p1788/p1788.h
As there are no polymorphism in C, mixed-format operation are
expressed by a suffix that encodes types of outputs and inputs.
Interval datatypes are encoded by upper-case chars:
F - infsup_b32
D - infsup_b64
Q - infsup_b128 // not used yet
Number formats are encoded by lower-case chars:
f - b32
d - b64
q - b128 // not used yet
Byte/word strings are encoded:
c - char8
w - char16 // not used yet
Integer parametes (like p in pown(x,p) or array length in reduction operations
are encoded:
i - int32
l - int64 // not used yet
Reverse-mode operations are in two variants:
with explicit parameter "x"
and without it (default x=Entire).
I have doubts with "min" and "max" operations.
Section 9.1 says that they are
"A family of functions parameterized by the arity k."
Section 12.12 says that they are mixed-type operations.
Section 12.6.2 sats that there shall be variants of these operations for each
combination of interval types.
So for each "k", it is necessary 2^(k+1) variants.
This is a combinatoric explosure.
How can I bind this in C ?
Do you see other non-conformances in this API ?
Does somebody have other ideas of C binding organization ?
-Dima