浮點數(shù)基本運算 浮點數(shù)的基本運算主要有四則運算、符號處理、大小比較,以及浮點數(shù)分柝等。 包含頭文件 "fn.hpp" #include "fn.hpp" 浮點數(shù)基本運算 浮點數(shù)的基本運算中有加、減、乘、除、取負、絕對值、相等比較等。 加減乘除 加、減、乘、除四個運算極為相似,都是需要兩個參數(shù),結(jié)果當然也是浮點數(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 } // 兩個浮點數(shù) struct two { static const double f_val = 2.0 } minus<two, plus<divides<one, two>::value, one>::value >::value::f_val == 0.5 取負 取負運算就是取一個浮點數(shù)的負數(shù)。
上傳時間: 2014-12-06
上傳用戶:exxxds
自己用C編寫的小游戲,DOS界面哦,可以運行。 浮點數(shù)基本運算 浮點數(shù)的基本運算主要有四則運算、符號處理、大小比較,以及浮點數(shù)分柝等。 包含頭文件 "fn.hpp" #include "fn.hpp" 浮點數(shù)基本運算 浮點數(shù)的基本運算中有加、減、乘、除、取負、絕對值、相等比較等。 加減乘除 加、減、乘、除四個運算極為相似,都是需要兩個參數(shù),結(jié)果當然也是浮點數(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 } // 兩個浮點數(shù) struct two { static const double f_val = 2.0 } minus<two, plus<divides<one, two>::value, one>::value >::value::f_val == 0.5 取負 取負運算就是取一個浮點數(shù)的負數(shù)。
上傳時間: 2014-12-06
上傳用戶:jichenxi0730
Manufacturers of electronic systems that require power conversion are faced with the need for higher-density dc-to-dc converters that perform more efficiently,
標簽: Manufacturers electronic conversion systems
上傳時間: 2015-04-17
上傳用戶:diets
CBC下寫的串口編程,API函數(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.
上傳時間: 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).
標簽: programming interface provides standard
上傳時間: 2014-12-06
上傳用戶:a6697238
Routine mar1psd: To compute the power spectum by AR-model parameters. Input parameters: ip : AR model order (integer) ep : White noise variance of model input (real) ts : Sample interval in seconds (real) a : Complex array of AR parameters a(0) to a(ip) Output parameters: psdr : Real array of power spectral density values psdi : Real work array in chapter 12
標簽: parameters AR-model Routine mar1psd
上傳時間: 2015-06-09
上傳用戶:playboys0
最小二乘法曲線擬合 作者:佚名 文章來源:不詳 點擊數(shù):164 更新時間: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兩軸的坐標 //M -- 結(jié)果變量組數(shù) //N -- 采樣數(shù)目 //A -- 結(jié)果參數(shù) 文章錄入:admin 責任編輯:admin
上傳時間: 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ā)本單元中自帶的錯誤處理例程. b.該轉(zhuǎn)換結(jié)果符合標準金額大寫書寫格式,零角零分等字樣不存在于最終的 轉(zhuǎn)換結(jié)果中. c.本轉(zhuǎn)換程序自帶數(shù)據(jù)溢出等數(shù)據(jù)非法及轉(zhuǎn)換錯誤等處理例程. d.本程序適用于32位的Delphi版本.
上傳時間: 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
標簽: characteristics steady-state simulation the
上傳時間: 2013-11-29
上傳用戶:daguda
暫時只支持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))
標簽: 2000 imageslena studyjpeg imread
上傳時間: 2014-01-14
上傳用戶:懶龍1988
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1