原理:
52429 / 2 ^19 = 0.10000038146972656
所以(i * 52429) >> 19 = i * 0.1
注意:
2^10=1024, 103/1024=0.1005859375
2^11=2048, 205/2048=0.10009765625
2^12=4096, 410/4096=0.10009765625
2^13=8192, 820/8192=0.10009765625
2^14=16384, 1639/16384=0.10003662109375
2^15=32768, 3277/32768=0.100006103515625
2^16=65536, 6554/65536=0.100006103515625
2^17=131072, 13108/131072=0.100006103515625
2^18=262144, 26215/262144=0.10000228881835938
2^19=524288, 52429/524288=0.10000038146972656
精度19最高,超过20 * i 就溢出了
然后: (i + (i << 2) + (i << 3) + (i << 6) + (i << 7) + (i << 10) + (i << 11) + (i<<14) + (i<<15)) >> 19 = i / 10
分享到:
相关推荐
<a href="">北京</a><a href="">上海</a><a href="">天津</a><a href="">重庆</a><a href="">河北</a><a href="">山西</a><a href="">河南</a><a href="">辽宁</a><a href="">吉林</a><a href="">黑龙江</a><a href...
/******************************************************************************/ /* Filter Solutions Version 2009 Nuhertz Technologies, L.L.C. */ /* www.nuhertz.com */ /* +1 602-279-2448 */ /* 3rd ...
<TD align=left width=98 height=30><strong><font color=#009933>¥98元</font></strong></TD></TR></TBODY></TABLE></DIV></TD> <TD align=middle width=173 background=...
<asp:TextBox ID="VCode" runat="server" Height="19px" Width="64px"></asp:TextBox> <img id="VertImage" src="VertImage.aspx?temp=-1" alt="点击刷新验证码" onclick=" javascript:ReloadCode(); " style=...
- **标签**: `<i>斜体文字</i>` - **用途**: 使文字变为斜体。 - **示例**: `<i>这是斜体</i>` **7. 下划线** - **标签**: `<u>带下划线的文字</u>` - **用途**: 为文字添加下划线。 - **示例**: `<u>强调...
public class MD5Code { static final int S11 = 7;... /* 19 */ b = GG(b, c, d, a, x[0], S24, 0xe9b6c7aaL); /* 20 */ a = GG(a, b, c, d, x[5], S21, 0xd62f105dL); /* 21 */ d = GG(d, ...
- **(28) Dim a(10) For i=1 to 10 A(i)=i*10+i Next i Print a(6) Mod a(5)** - 输出1。 - **(29) Dim a(10) For i=1 to 10 Step 2 A(i)=i*10.5+i Next i Print a(7);a(3)** - 输出77.5 33.5。 - **(30) Dim...
Array([0] => -6 [1] => -5 [2] => -4 [3] => -3 [4] => -2 [5] => -1 [6] => 1 [7] => 2 [8] => 3 [9] => 4 [10] => 5 [11] => 6 [12] => 7 [13] => 8 [14] => 9 [15] => 10 [16] => 11 [17] => 12 [18] => 13 [19]...
charset=gb2312" /><br><title>test</title><br></head><br><body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0"><br><table height=1000><br><tr><td>dddd</td></tr><br></table><br></body><br...
19. **`<body>`标签属性**: - **描述**: - **背景颜色**: `bgcolor="#RRGGBB"` - **背景图像**: `background="背景图片URL"` - **文本颜色**: `text="#RRGGBB"` - **链接颜色**: `link="#RRGGBB"` - **访问过...
// document.write(i*100+j*10+t+'<br>'); // } // } // } // } /* for (var i=1; i<10;i++ ){ for (var j=0; j<10;j++){ for (var t=0; t<10;t++) { if (i*i*i+j*j*j+t*t*t===i*100+j*10+t) { ...
Const adFieldIntegrityViolation = 10 Const adFieldSchemaViolation = 11 Const adFieldBadStatus = 12 Const adFieldDefault = 13 Const adFieldIgnore = 15 Const adFieldDoesNotExist = 16 Const ...
// 输出: Array ( [0] => Array ( [0] => 1 [1] => 2 ) [1] => Array ( [0] => 3 [1] => 4 ) [2] => Array ( [0] => 5 ) ) ``` ##### 3. `array_combine` **功能描述:** 创建一个新的数组,其中使用一个数组的值...
/* U0, Y0, V0, Y1: For VO overlay, with low bit for alpha blending */ vdfMono = 0x00004000, /* 8 bit monochrome */ vdfYUV444Planar = 0x00008000, }; /// <summary> /// 视频制式 /// </summary> ...
0x19, 0xe0, /* USAGE_MINIMUM (Keyboard Left Control) */ 0x29, 0xe7, /* USAGE_MAXIMUM (Keyboard Right GUI) */ 0x15, 0x00, /* LOGICAL_MINIMUM (0) */ 0x25, 0x01, /* LOGICAL_MAXIMUM (1) */ 0x75, 0x01...
- **LED19**: I/O 19 - **LED20**: I/O 20 - **LED21**: I/O 21 - **LED22**: I/O 26 #### 九、晶振输入、蜂鸣器、复位按键与EPM240引脚I/O对应关系 - **晶振输入(CLK)**: I/O 12 - **蜂鸣器(BELL)**: I/O 7 - **...
实验一 时间片轮转算法模拟程序<br>* writen by daysky<br>* 2007-11-19<br>*<br>********************************************************************************************/<br><br>#include <iostream><br>...
// array('name' => 'alipay_virtual_method', 'type' => 'select', 'value' => '0'), // array('name' => 'is_instant', 'type' => 'select', 'value' => '0') array('name' => 'alipay_pay_method', 'type' => '...
<File sequence="40000000" partition="/dev/block/mmcblk0p13">recovery.img</File> <File sequence="80000000" partition="/dev/block/mmcblk0p03">baseband.img</File> <File sequence="EC000000">version.txt</...
/********************************************************************/ //pin defined //========================================== 宏定义 =============================================== sbit Bj_tishi1 ...