浮點(diǎn)數(shù)基本運(yùn)算 浮點(diǎn)數(shù)的基本運(yùn)算主要有四則運(yùn)算、符號(hào)處理、大小比較,以及浮點(diǎn)數(shù)分柝等。 包含頭文件 "fn.hpp" #include "fn.hpp" 浮點(diǎn)數(shù)基本運(yùn)算 浮點(diǎn)數(shù)的基本運(yùn)算中有加、減、乘、除、取負(fù)、絕對(duì)值、相等比較等。 加減乘除 加、減、乘、除四個(gè)運(yùn)算極為相似,都是需要兩個(gè)參數(shù),結(jié)果當(dāng)然也是浮點(diǎn)數(shù)了。 例子: // 加 減 乘 除 btil::fn::plus<f1, f2>::value // f1+f2 的結(jié)果 btil::fn::minus<f1, f2>::value // f1-f2 的結(jié)果 btil::fn::multiplies<f1, f2>::value // f1*f2 的結(jié)果 btil::fn::divides<f1, f2>::value // f1/f2 的結(jié)果 plus<f1, f2>::value::f_val // f1+f2 的結(jié)果的值 struct one { static const double f_val = 1.0 } // 兩個(gè)浮點(diǎn)數(shù) struct two { static const double f_val = 2.0 } minus<two, plus<divides<one, two>::value, one>::value >::value::f_val == 0.5 取負(fù) 取負(fù)運(yùn)算就是取一個(gè)浮點(diǎn)數(shù)的負(fù)數(shù)。
標(biāo)簽: 浮點(diǎn)數(shù) 運(yùn)算 四則運(yùn)算 比較
上傳時(shí)間: 2014-12-06
上傳用戶:exxxds
自己用C編寫的小游戲,DOS界面哦,可以運(yùn)行。 浮點(diǎn)數(shù)基本運(yùn)算 浮點(diǎn)數(shù)的基本運(yùn)算主要有四則運(yùn)算、符號(hào)處理、大小比較,以及浮點(diǎn)數(shù)分柝等。 包含頭文件 "fn.hpp" #include "fn.hpp" 浮點(diǎn)數(shù)基本運(yùn)算 浮點(diǎn)數(shù)的基本運(yùn)算中有加、減、乘、除、取負(fù)、絕對(duì)值、相等比較等。 加減乘除 加、減、乘、除四個(gè)運(yùn)算極為相似,都是需要兩個(gè)參數(shù),結(jié)果當(dāng)然也是浮點(diǎn)數(shù)了。 例子: // 加 減 乘 除 btil::fn::plus<f1, f2>::value // f1+f2 的結(jié)果 btil::fn::minus<f1, f2>::value // f1-f2 的結(jié)果 btil::fn::multiplies<f1, f2>::value // f1*f2 的結(jié)果 btil::fn::divides<f1, f2>::value // f1/f2 的結(jié)果 plus<f1, f2>::value::f_val // f1+f2 的結(jié)果的值 struct one { static const double f_val = 1.0 } // 兩個(gè)浮點(diǎn)數(shù) struct two { static const double f_val = 2.0 } minus<two, plus<divides<one, two>::value, one>::value >::value::f_val == 0.5 取負(fù) 取負(fù)運(yùn)算就是取一個(gè)浮點(diǎn)數(shù)的負(fù)數(shù)。
上傳時(shí)間: 2014-12-06
上傳用戶:jichenxi0730
Locally weighted polynomial regression LWPR is a popular instance based al gorithm for learning continuous non linear mappings For more than two or three in puts and for more than a few thousand dat apoints the computational expense of pre dictions is daunting We discuss drawbacks with previous approaches to dealing with this problem
標(biāo)簽: polynomial regression weighted instance
上傳時(shí)間: 2013-11-28
上傳用戶:sunjet
一個(gè)完整的2D滾屏游戲示例,編譯后可以運(yùn)行玩耍。使用DIRECT DRAW,DIRECT INPUT,DIRECT SOUND;游戲邏輯完整,有記分系統(tǒng),供喜歡游戲編程的初學(xué)者參考切磋。
標(biāo)簽:
上傳時(shí)間: 2013-12-23
上傳用戶:王慶才
http://www.edacn.net/cgi-bin/forums.cgi?forum=7&topic=9127下,則R3~R0的輸出信號(hào)中會(huì)有一個(gè)為1,但我們還是是無(wú)法確定哪一個(gè)鍵被按下,必須要從R3 ~R0 的輸出信號(hào)與C3~C0的掃描信號(hào)共同決定那個(gè)按鍵被按下. 編寫VHDL的構(gòu)思: 外部接口包括: a. INPUT腳 : CLK , R3~R0. b. OUTPUT腳 : C3~C0 , DATA3~DATA0(辨別出的按鍵值).
標(biāo)簽: cgi-bin forums edacn forum
上傳時(shí)間: 2015-04-09
上傳用戶:zm7516678
One of the most important issues affecting the implementation of microcontroller software deals with the data-decision algorithm. Data-decision refers to decoding the DIO-pin from the CC400/CC900. Two main principles exist for decoding Manchester-coded data: Data decision based on timing the period between transitions, and data decision based on oversampling.
標(biāo)簽: microcontroller implementation important affecting
上傳時(shí)間: 2013-12-18
上傳用戶:671145514
隨機(jī)性發(fā)生器、冒泡分類和混洗一組12張牌的演示程序。 Demonstrates the use of a randomizer, bubble-sort and an array to "shuffle" a deck of 12 cards. I put it here for those of you who are trying to figure out how to shuffle with a randomizer without having the same card appear two-or-more times.
標(biāo)簽: Demonstrates bubble-sort randomizer array
上傳時(shí)間: 2014-01-16
上傳用戶:zhanditian
Tic Tac Toe程序。可以供一到兩個(gè)玩家使用。程序中使用了visual basic 計(jì)時(shí)器,所以每一個(gè)步驟都有時(shí)間限制。此外,計(jì)算機(jī)可是一個(gè)有簡(jiǎn)單智能的對(duì)手,他不但不會(huì)隨便出手,反而還要竭力贏了你才罷休。 Tic Tac Toe program. One or two players. It uses the visual basic timer, so each move has time limit. Simple artificial intelligence: computer does not play randomly, but "tries" to win and stop you from winning.
標(biāo)簽: visual basic Tic Tac
上傳時(shí)間: 2015-04-11
上傳用戶:sxdtlqqjl
CC386 is a general-purpose 32-bit C compiler. It is not an optimizing compiler but given that the code generation is fairly good. There are two versions one is for MSDOS/DPMI and one is for Win32. The Win32 version has a full-blown IDE capable of editing, building, and debugging windows programs included with it. However at this time debugging support for MSDOS is rudimentary at best and there is no IDE for DOS. the newest version, support windows.
標(biāo)簽: compiler general-purpose optimizing given
上傳時(shí)間: 2015-04-12
上傳用戶:gtzj
無(wú)線仿真Matlab代碼,Matlab scripts to generate input trace files. Changed in January 2005
上傳時(shí)間: 2015-04-13
上傳用戶:wkchong
蟲蟲下載站版權(quán)所有 京ICP備2021023401號(hào)-1