<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div style="font-family: Verdana;font-size: 12.0px;">
<div><br/>
hello 'clang-list',<br/>
<br/>
!!! be careful with the batches provided, they wipe directories 'build' and 'lib' below their homedir and evtl. the dir called from !!!<br/>
<br/>
I am a newbie, pls. be indulgent reg. evtl nonsense in my question.I'm writing in hope someone can help me with too many and too complicated compiling options.<br/>
<br/>
pls. answer to my email address as i'm not yet subscribed to the list.  n e w b i e - 0 2 ( at ) g m x ( dot ) d e omitt spaces.<br/>
<br/>
question in short: how to achieve clean (fully IEEE 75 compatible) powers of ten for 80-bit 'long doubles',<br/>
- either with gcc or - which i found working -<br/>
- with exp10l( x ) and compiling with 'clang++ | -cc1 | -x c++', !!! but i would need it 'wrapped' in a 'pure C compatible' shared library to be able to call it from 'C' files / gcc.<br/>
<br/>
I'd like to solve a 'C', 'C++', FP-math, compiling problem, one option would be producing 'clean powers of 10' with gcc, another to combine different compilers.<br/>
<br/>
I found one compiler and options to achieve them,<br/>
<br/>
( powers for 'double' values are covered with 'gcc -O2' and individual handling of two fails at 'pow( 10, 23 )' and 'pow( 10, 210 )' ),<br/>
<br/>
for 80-bit 'long doubles' gcc and g++ produce huge amounts of fails, but Intels 'icpx' or 'dpcpp' compilers using clang++ with special options do the job with 'exp10l( x )',<br/>
<br/>
see batch  'c2_icpx_ok.sh'  in attached archive. ( to run / use it you need either the Intel oneAPI stuff installed in it's default location, or good knowledge about clang(++) to adapt the scripts ) ),<br/>
<br/>
The project in which I want to use it is 'gnumeric', and AFAIK that is 'pure C' and compiling it with gcc is deeply buried in the build process. <br/>
<br/>
( I'm neither a 'coder' nor an experienced one, just learning in small steps acc. scripts and cookbooks, could build and install the long double version of gnumeric and get it up and running, could patch together the attached 'problem description suite', but then my capa ends. I cant even tell if clang was on my system by default or came with the intel 'oneAPI' stuff and thus don't know which version i'm on. ) <br/>
<br/>
At the moment I see two options:<br/>
<br/>
A) to tune gcc and the used libraries / options in a way that they would calculate correct results with exp10l() or by any other means,<br/>
<br/>
B) to produce a precompiled library with icpx / clang++ and call it from 'gnumeric' or 'goffice' ( a library used by gnumeric ).<br/>
<br/>
I tried both options,<br/>
<br/>
A): could not get gcc to produce better results, not even with -O0,  :-( <br/>
<br/>
B): could! get together a C++ program running and calling a C++ library, even call it from a 'C' program, but not! combined with the otions which produce the good power of 10 results (mainly '-cc1' and '-x c++'). see batch 'l09_clang++_dynamic_lib_calling_from_gcc.sh' in attached archive,<br/>
<br/>
for further info see file README in the archive.<br/>
<br/>
since I would like to concentrate on my actual work, to tune floating point calculations as far as possible decimally correctly, I now ask experts if someone can take this task off my hands. Basically it seems to me solvable and with my preliminary work sufficiently narrowed down that the technical possibility is proven, but a reasonable functioning implementation requires skills that I do not have.
<div> </div>
Can you help me out? Either tune gcc (otions) or adapt the options in 'l09_clang++_dynamic_lib_calling_from_gcc.sh' and the called 'build-lib_09.sh' and 'build_09.sh' scripts to produce a library with good results? Or do you know someone who can?<br/>
<br/>
As shipped some of the batches calculate only from 10^-10 to 10^10 and have fails at -3 and -2, to get the full test change the scope for 'i' in powers10l.cpp to -4951 .. 4933. <br/>
<br/>
oh, you might need: my HW: intel xeon about 4 years old, my OS Linux Kali / Debian, kernel about two years old, system from mid 2021.<br/>
<br/>
Best Regards,<br/>
<br/>
<br/>
<br/>
Bernhard<br/>
<br/>
P.S. there are some other batches in the archieve about tries, see comments in the files, in README and in 'long_explanation'.</div>
</div></div></body></html>