• slider image 514
  • slider image 516
  • slider image 517
  • slider image 518
  • slider image 519
:::


Browsing this Thread:   2 Anonymous Users






Re: 使用4520的除法
#3
版主
版主


查看用戶資訊
剛翻了一下新版的 C18 發現已經有支援浮點數的運算了,底下為 copy 使用手冊裡有關浮點數的片斷:
5.2 32-BIT FLOATING POINT MATH LIBRARY
The basic floating point operations—add, subtract, multiply, divide and conversions
between floats and integers—comply with the IEEE 754 standard for single precision
floats with two exceptions. The exceptions will be discussed under Subnormals
(Section 5.2.1.2 “Subnormals”) and Rounding (Section 5.2.2 “Rounding”). The
extended mode and traditional mode use the same float representations and the
results of float operations are the same.
The IEEE standard for binary floating-point arithmetic published in 1985 became
known officially as ANSI/IEEE Std 754-1985 [IEEE85]. The standard has three
important requirements:
• consistent representation of floating-point numbers by all machines adopting the
standard;
• correctly rounded floating-point operations, using various rounding modes;
• consistent treatment of exceptional situations such as division by zero.

發表於: 2007/11/12 18:12
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 使用4520的除法
#2
版主
版主


查看用戶資訊
C18 不支援浮點運算,而且 Printf( ) 也只有到 long 而已。
到這裡找一下看看:
http://www.piclist.com/techref/microchip/math/basic.htm

發表於: 2007/11/12 17:00
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


使用4520的除法
#1
新會員
新會員


查看用戶資訊
您好:
請問我要使一個數值(long 或unsigned long)做一連串加減乘除,再把他顯示到led上去,目前遇到兩個問題

第一個是我如何把數值作除法變float?
第二個是我知道可以把long用ltoa 把數值轉成string,在放到lcd上
但如何把float 弄成string呢?
謝謝

發表於: 2007/11/12 10:20
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------