-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates for C99 standards compliance #26
Conversation
Also made adjustments to remove compile warnings as Apple LLVM vesion 9.0.0 reports
@underwoo when it comes to the grid generation tools, I think it best to
have it as an option for the user to configure. The unexpected change from
system to system can and will impact the users who are creating grids for
any purpose (regridding, new experiments, etc). However, as this is
determined at build time, users on a shared system will not necessarily
know what was used during the build. While it would be nice to have this
as a runtime option, I don't know how we'd accomplish that without adding
lines of code. I think our best course of action is to add an attribute to
the NetCDF file when appropriate.
…On Thu, Dec 10, 2020 at 10:16 AM Seth Underwood ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In tools/libfrencutils/mosaic_util.c
<#26 (comment)>:
> angle = 0. ;
else {
ddd = (px*qx+py*qy+pz*qz) / sqrt(ddd);
- if( fabs(ddd-1) < EPSLN30 ) ddd = 1;
- if( fabs(ddd+1) < EPSLN30 ) ddd = -1;
+ if( fabsl(ddd-1) < EPSLN30 ) ddd = 1;
+ if( fabsl(ddd+1) < EPSLN30 ) ddd = -1;
@bensonr <https://github.com/bensonr> should quad precision be enables on
all systems that support long double, or should it be something the user
turns on/off with an option to configure?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABSKBVCMPDP2R3BPV3OG4WLSUDQ5NANCNFSM4ULJSR4A>
.
|
One other thing I forgot in my review was the use of the _AIX macros. Those were removed from the FMS project and it's probably safe to do the same here. |
Changed name of quad precision macro to 'HAVE_LONG_DOUBLE_WIDER' to use the AC_TYPE_LONG_DOUBLE_WIDER' test. If the system does not have higher precision for `long double` over `double`, and user requests `--enable-quad-precision`, configure will display an error message. Added a LICENSE file and added test and license badges to readme.
07b6f51
to
9cdb856
Compare
#endif | ||
if (fabs(det) < EPSLN15 ) return 0; | ||
#endif | ||
if (fabsl(det) < EPSLN15 ) return 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to be reverted to fabs to work with the macro inserted into mosaic_util.h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
det
is defined a few lines above as const long double det
. Since det
is always long double
this is the correct abs function.
Updated to c99 standards and resolved several compile time warnings.