A new algorithm to calculate the exponential function ex was developed to directly estimate the biased exponent and tail code based on the canister principle of the double precision number in computer.
基于双精度数在计算机中是按阶码和尾码分别存储的原理,提出了一种新的计算指数函数y=ex的方法,它能直接计算出y的指数部分(阶码)和有效数位(尾码),并直接存储到变量y中。
It describes how floating-point data(float,double,long double) stored in memory,the range and precision of storage formats,and how to validate it in simple C program.
总结了C语言中的单精度型(float)、双精度型(double)和长双精度型(long double)浮点数的存储格式,并用简洁的C程序给出了验证;对其表示的十进制数的有效数字位数,从相对误差的角度,给出了判定方法及结论。
CopyRight © 2020-2024 优校网[www.youxiaow.com]版权所有 All Rights Reserved. ICP备案号:浙ICP备2024058711号