ComputationalPhysiology / gotran

Library for declaring and translating ODEs
http://computationalphysiology.github.io/gotran/
GNU Lesser General Public License v3.0
2 stars 1 forks source link

Single-precision support is broken #5

Open KGHustad opened 4 years ago

KGHustad commented 4 years ago

The support for using single-precision floating-point numbers is not working correctly in C, C++, CUDA, and OpenCL.

Single-precision variants of mathematical functions are not used

In C/C++, exp, log, sqrt are used instead of expf, logf, sqrtf.

Double-precision literals can sneak into the code, causing implicit casts to double-precision.

Double-precision floating-point literals can sneak into the code from modelparameters.

This issue is probably hard to fix without a major rewrite of gotran or applying some very ugly fixes to the final code.