将运算的结果(浮点数)存入eeprom中。我们知道,浮点数在c语言中是以ieee格式存储 的,一个浮点数占用四个字节,例如浮点数34.526存为(160,26,10,66)这四个数。要 将一个浮点数存入eeprom,实际上就是要存这四个数。那么如何在程序中得到一个浮点数的 组成数呢? 浮点数在存储时,是存储连续的字节中的,只要设法找到存储位置,就可以得到这些数了。 可以定义一个void的指针,将此指针指向需要存储的浮点数,然后将此指针强制转化为char型,这样,利用指针就可以得到组成该浮点数的各个字节的值了!- 下载
单片机浮点运算子程序,使用C51编程,可分别得到整数部分和小数部分,数据存储长度为4字节.-SCM floating point routines, the use of C51 programming, respectively integral part and be part of a minority, data storage for 4-byte length. 下载
使用数组精确计算M/N(0<M<N<=100)的值。如果M/N是无限循环小数,则计算并输出它的第一循环节,同时要求输出 循环节的起止位置(小数位的序号) *问题分析与算法设计 由于计算机字长的限制,常规的浮点运算都有精度限制,为了得到高精度的计算结果,就必须自行设计实现方法。 为了实现高精度的计算,可将商存放在一维数组中,数组的每个元素存放一位十进制数,即商的第一位存放在第一个元素中,商的第二位存放在第二个元素中....,依次类推。这样就可以使用数组不表示一个高精度的计算结果。 进行除法运算时可以模拟人的手工操作,即每次求出商的第一位后,将余数乘以10,再计算商的下一位,重复以上过程,当某次计算后的余数为0 时,表示M/N为有限不循环小数某次计算后的余数与前面的某个余数相同时,则M/N为无限循环小数,从该余数第一次出现之后所求得的各位数就是小数的循环节。 程序具体实现时,采用了数组和其它一些技巧来保存除法运算所得到的余数和商的各位数。 -arrays precise calculation of the M / N (0lt; Mlt; Nlt; = 100) value. If M / N is unlimited circulator, calculated and exporting its first cycle of festivals, while output cycle requirements of section starting and ending location (number of decimal places) * Analysis and design of computer algorithms size limitations, conventional precision floating-point operations have restrictions, in order to have a high-precision the results, we must design their own method. In order to achieve high precision calculations can be stored in a business-dimensional arrays, each array element placed a decimal number, the first one in a storage element, the second in the second storage element ..., followed by analogy. This array can use it does not mean that a highly accurate results. For computing divisi 下载
c ftp客户端 ijcv omap1710 等值线 vc 英文识别 vc 用java开发简单的rss阅读器 dsstream 原始套接字编程例子 orthogonal frequency division multiplexing game source code rpg lpc2106开发板 cvi应用学习 c51串口收发程序 vc换肤源代码 mfc 坐标 小数 rtp/rtcp java局域网聊天工具 综合布线方案设计ppt 3310液晶 仪表控件下载ocx dos 内存管理 opengl 原理 c 打印 datagridview usbd12 fdtd source code mp3 编解码 源码 db数据库直接连接 界面库 win iic读写程序 c8051f j2me 编辑 下载 csharp 删除文件 canny算子 ctabctrl标签 vc 实现undo 韦根 程序 vb播放器列表代码 单片机 usb2.0通讯 ucos 最新版本 vb调用matlab dll 利用网络高效维护机房 source code vb opc client mfc快捷键 js日历控件下载 软交换技术与应用 下载 ubb留言 ajax slideshow wininet http下载 vb酒店管理系统 8051 模拟 iic sharp lh79524