浮點數基本運算 浮點數的基本運算主要有四則運算、符號處理、大小比較,以及浮點數分柝等。 包含頭文件 "fn.hpp" #include "fn.hpp" 浮點數基本運算 浮點數的基本運算中有加、減、乘、除、取負、絕對值、相等比較等。 加減乘除 加、減、乘、除四個運算極為相似,都是需要兩個參數,結果當然也是浮點數了。 例子: // 加 減 乘 除 btil::fn::plus<f1, f2>::value // f1+f2 的結果 btil::fn::minus<f1, f2>::value // f1-f2 的結果 btil::fn::multiplies<f1, f2>::value // f1*f2 的結果 btil::fn::divides<f1, f2>::value // f1/f2 的結果 plus<f1, f2>::value::f_val // f1+f2 的結果的值 struct one { static const double f_val = 1.0 } // 兩個浮點數 struct two { static const double f_val = 2.0 } minus<two, plus<divides<one, two>::value, one>::value >::value::f_val == 0.5 取負 取負運算就是取一個浮點數的負數。
上傳時間: 2014-12-06
上傳用戶:exxxds
自己用C編寫的小游戲,DOS界面哦,可以運行。 浮點數基本運算 浮點數的基本運算主要有四則運算、符號處理、大小比較,以及浮點數分柝等。 包含頭文件 "fn.hpp" #include "fn.hpp" 浮點數基本運算 浮點數的基本運算中有加、減、乘、除、取負、絕對值、相等比較等。 加減乘除 加、減、乘、除四個運算極為相似,都是需要兩個參數,結果當然也是浮點數了。 例子: // 加 減 乘 除 btil::fn::plus<f1, f2>::value // f1+f2 的結果 btil::fn::minus<f1, f2>::value // f1-f2 的結果 btil::fn::multiplies<f1, f2>::value // f1*f2 的結果 btil::fn::divides<f1, f2>::value // f1/f2 的結果 plus<f1, f2>::value::f_val // f1+f2 的結果的值 struct one { static const double f_val = 1.0 } // 兩個浮點數 struct two { static const double f_val = 2.0 } minus<two, plus<divides<one, two>::value, one>::value >::value::f_val == 0.5 取負 取負運算就是取一個浮點數的負數。
上傳時間: 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
標簽: polynomial regression weighted instance
上傳時間: 2013-11-28
上傳用戶:sunjet
This an adaptive receiver for a direct-sequence spread spectrum (DS-SS) system over an AWGN channel. The adaptive receiver block is modified from the LMS adaptive filter block in DSP Blockset. For DS-SS signal reception, the adaptive filter needs to have multi-rate operation. The input sample rate is equal to chip rate and the output is at symbol rate. Two rates are related by PG, processing gain
標簽: direct-sequence adaptive receiver spectrum
上傳時間: 2014-01-16
上傳用戶:D&L37
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.
標簽: microcontroller implementation important affecting
上傳時間: 2013-12-18
上傳用戶:671145514
隨機性發生器、冒泡分類和混洗一組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.
標簽: Demonstrates bubble-sort randomizer array
上傳時間: 2014-01-16
上傳用戶:zhanditian
Tic Tac Toe程序??梢怨┮坏絻蓚€玩家使用。程序中使用了visual basic 計時器,所以每一個步驟都有時間限制。此外,計算機可是一個有簡單智能的對手,他不但不會隨便出手,反而還要竭力贏了你才罷休。 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.
上傳時間: 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.
標簽: compiler general-purpose optimizing given
上傳時間: 2015-04-12
上傳用戶:gtzj
ICA can be used in brain activation studies to reduce the number of dimension and filter out independent and interesting activations. This demonstration shows two studies. One provided by Hvidovre Universitets Hospital, Denmark, that consists of fMRI scannings of humans. Another provided by the EU sponsored MAPAWAMO project from fMRI scannings of monkeys. In the demo comparison between icaMS, icaML, icaMF, icaMF (positive sources) and PCA can be made. More detailes can found in [2].
標簽: activation dimension studies indepen
上傳時間: 2015-04-19
上傳用戶:zukfu
For the incomplete methods, we kept the representation of the queens by a table and the method of calculation to determine if two queens are in conflict, which is much faster for this kind of problems than the representation by a matrix. heuristics: descent. Tests: 100 queens in less than 1 second and 67 iterations. 500 queens in 1 second and 257 iterations. 1000 queens in 11 seconds and 492 iterations. heuristics: Simulated annealing. Tests: 100 queens in less than 1 second and 47 iterations. 500 queens in 5 seconds and 243 iterations. 1000 queens in 13 seconds and 497 iterations. heuristics: based on Simulated Annealing. Tests: 100 queens in less than 1 second and 60 iterations. 500 queens in 1 second and 224 iterations. 1000 queens in 5 seconds and 459 iterations. 10 000 queens in 20 minutes 30 seconds and 4885 iterations.
標簽: the representation incomplete methods
上傳時間: 2015-05-05
上傳用戶:1159797854