自己用C編寫的小游戲,DOS界面哦,可以運(yùn)行。 浮點(diǎn)數(shù)基本運(yùn)算 浮點(diǎn)數(shù)的基本運(yùn)算主要有四則運(yùn)算、符號處理、大小比較,以及浮點(diǎn)數(shù)分柝等。 包含頭文件 "fn.hpp" #include "fn.hpp" 浮點(diǎn)數(shù)基本運(yùn)算 浮點(diǎn)數(shù)的基本運(yùn)算中有加、減、乘、除、取負(fù)、絕對值、相等比較等。 加減乘除 加、減、乘、除四個(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
CBC下寫的串口編程,API函數(shù)實(shí)例 I wish this site had been around when I was trying to figure out how to make serial communications work in Windows95. I, like many programmers, was hit with the double-whammy of having to learn Windows programming and Win95 serial comm programming at the same time. I found both tasks confusing at best. It was particularly frustrating because I had, over the years, written so much stuff (including lots of serial comm software) for the DOS environment and numerous embedded applications. Interrupt driven serial comm, DMA transfer serial comm, TSR serial comm, C, assembler, various processors... you name it, it had written it. Yet, everything I knew seemed upside-down in the message-driven-callback world of Windows.
上傳時(shí)間: 2014-06-20
上傳用戶:cccole0605
The Audio File Library provides a uniform programming interface to standard digital audio file formats. This library allows the processing of audio data to and from audio files of many common formats (currently AIFF, AIFF-C, WAVE, NeXT/Sun .snd/.au, IRCAM, AVR, Amiga IFF/8SVX, and NIST SPHERE). The library also supports compression (currently G.711 mu-law and A-law and IMA and MS ADPCM) as well as PCM formats of all flavors (signed and unsigned integer, single- and double-precision floating point).
標(biāo)簽: programming interface provides standard
上傳時(shí)間: 2014-12-06
上傳用戶:a6697238
最小二乘法曲線擬合 作者:佚名 文章來源:不詳 點(diǎn)擊數(shù):164 更新時(shí)間:2006-1-4 【字體:小 大】【發(fā)表評論】【加入收藏】【告訴好友】【打印此文】【關(guān)閉窗口】 //最小二乘法曲線擬合 typedef CArray<double,double>CDoubleArray BOOL CalculateCurveParameter(CDoubleArray *X,CDoubleArray *Y,long M,long N,CDoubleArray *A) { //X,Y -- X,Y兩軸的坐標(biāo) //M -- 結(jié)果變量組數(shù) //N -- 采樣數(shù)目 //A -- 結(jié)果參數(shù) 文章錄入:admin 責(zé)任編輯:admin
上傳時(shí)間: 2014-01-24
上傳用戶:liansi
人民幣大寫金額轉(zhuǎn)換程序(修正版v0.0.3) =================================== 1.使用方法: ------------- 將Cash_RMB.dcu放入Delphi安裝目錄下的Lib中,在uses中加入Cash_RMB, 即可引用CashRMB方法. function CashRMB(CashAmount: Double): String 如: procedure TForm1.Button1Click(Sender: TObject) begin QRLabel1.Caption := CashRMB(Table1.FieldByName( 金額 ).AsFloat) end 結(jié)果將傳回人民幣金額大寫字符串. 如果 CashAmount = 0 或數(shù)值溢出(超出萬億位),結(jié)果返回空串. 2.說明: -------- A.本轉(zhuǎn)換程序最大程度只支持到萬億元(位)的金額數(shù)值轉(zhuǎn)換操作.如果你的 轉(zhuǎn)換數(shù)值超出此極限,你可以在調(diào)用前先行判斷數(shù)據(jù)的合法性,如果沒有作預(yù) 先判斷,轉(zhuǎn)換過程中將引發(fā)本單元中自帶的錯(cuò)誤處理例程. b.該轉(zhuǎn)換結(jié)果符合標(biāo)準(zhǔn)金額大寫書寫格式,零角零分等字樣不存在于最終的 轉(zhuǎn)換結(jié)果中. c.本轉(zhuǎn)換程序自帶數(shù)據(jù)溢出等數(shù)據(jù)非法及轉(zhuǎn)換錯(cuò)誤等處理例程. d.本程序適用于32位的Delphi版本.
標(biāo)簽: Cash_RMB dcu 轉(zhuǎn)換 程序
上傳時(shí)間: 2013-12-31
上傳用戶:hebmuljb
This demo develops the steady-state characteristics of an induction motor First start the simulation, then Double click the <PLOTS> block to view torque-speed and current-speed curves and the current circle diagram
標(biāo)簽: characteristics steady-state simulation the
上傳時(shí)間: 2013-11-29
上傳用戶:daguda
暫時(shí)只支持jpeg2000支持的 cdf97 和spline53 可以這樣來測試: x=imread( E:\study\jpeg2000\images\lena.tif ) % see the decomposition coefficients y=wavelift(x, 1, spl53 ) using spline 5/3 wavelet figure subplot(1,2,1) imshow(x) subplot(1,2,2) imshow(mat2gray(y)) % see the reconstruction precision yy=wavelift(x, 5) using cdf 9/7 wavelet ix=wavelift(yy,-5) inverse sum(sum((double(x)-ix).^2))
標(biāo)簽: 2000 imageslena studyjpeg imread
上傳時(shí)間: 2014-01-14
上傳用戶:懶龍1988
剖析Intel IA32 架構(gòu)下C 語言及CPU 浮點(diǎn)數(shù)機(jī)制 Version 0.01 哈爾濱工業(yè)大學(xué) 謝煜波 (email: xieyubo@126.com 網(wǎng)址:http://purec.binghua.com) (QQ:13916830 哈工大紫丁香BBSID:iamxiaohan) 前言 這兩天翻看一本C 語言書的時(shí)候,發(fā)現(xiàn)上面有一段這樣寫到 例:將同一實(shí)型數(shù)分別賦值給單精度實(shí)型和雙精度實(shí)型,然后打印輸出。 #include <stdio.h> main() { float a double b a = 123456.789e4 b = 123456.789e4 printf(“%f\n%f\n”,a,b) } 運(yùn)行結(jié)果如下:
標(biāo)簽: Version xieyubo Intel email
上傳時(shí)間: 2013-12-25
上傳用戶:徐孺
Please place this entire folder (complete with contents) into your System32 directory folder Double click on the Register .bat file to Register Double click on the UnRegister .bat file to UnRegister It s as simple as that! Cheers
標(biāo)簽: folder directory complete contents
上傳時(shí)間: 2013-12-23
上傳用戶:jyycc
函數(shù)模板T max(T a, T b, T c),使之實(shí)現(xiàn)對任何類型數(shù),能從三個(gè)數(shù)中求出最大數(shù)返回。設(shè)計(jì)各種類型數(shù)據(jù)(char,short,long,float,double)調(diào)用此函數(shù)模板。
上傳時(shí)間: 2015-07-07
上傳用戶:時(shí)代電子小智
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1