fortran - SELECTED_REAL_KIND in C -


is there equivalent of selected_real_kind (in fortran) in c language ?

selected_real_kind standard fortran mechanism choosing @ build time real data type meets or exceeds specified parameters numeric representation. in particular, used select data type precision , / or exponent range , / or radix.

standard c not have built-in parameterized facility such designating data types. does have standard macros values describe properties of implementations of standard floating-point types, float, double, , long double. joint radix, precisions in both decimal digits , implementation-radix digits, , minimum , maximum exponent values (also in both decimal , implementation-radix forms) available via these macros. these defined in standard header float.h. (the link posix, formally aligned c standard here.)

it possible use c preprocessor conditionals , these macros define macros or typedefs types meet specific requirements, can use throughout code. not tidy fortran's approach, gets job done.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -