原理:
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=...
PIC16F877 的外围功能模块 ...i--) /*连续发送8 个数据*/ { data=table[i]; /*通过数组的转换获得待显示的段码*/ SPILED(data); /*发送显示段码显示*/ } PORTA_5=1; /*最后给锁存信号,代表显示任务完成*/ }
<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=...
#include <stdio.h> #include <bios.h> ...i*2-1*/ { if(pos.x>=0&&pos.x<=18&&pos.y>=0&&pos.y<=18) { if(gChessBoard[pos.x][pos.y]==Order) { count++; if(count>=testnum) return TRUE; }...
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, ...
#include "stdio.h" /*I/O函数*/ #include "stdlib.h" /*其它说明*/ #include "string.h" /*字符串函数*/ #include "conio.h" /*屏幕操作函数*/ #include "mem.h" /*内存操作函数*/ #include "ctype.h" /*字符...
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...
Instance间共享*/ static final int S11 = 7; static final int S12 = 12; static final int S13 = 17; static final int S14 = 22; static final int S21 = 5; static final int S22 = 9; static final ...
// 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 ...
Tq=-19.313 295.27.*N-165.44.*N.^2 40.874.*N.^3-3.8445.*N.^4; Ft1=Tq.*ig.*i0.*eT./r; Ft2=Tq.*ig.*i0.*eT./r; Ft3=Tq.*ig.*i0.*eT./r; Ft4=Tq.*ig.*i0.*eT./r; s=2*pi*r*0.001; Ua1=n./ig./i0.*60.*...
<br> /// </summary><br> <br> [DllImport("User32.dll",EntryPoint="SendMessage")]<br> private static extern int <br> SendMessage(<br> int hWnd, // handle to destination window<br> int Msg, // ...
/* U0, Y0, V0, Y1: For VO overlay, with low bit for alpha blending */ vdfMono = 0x00004000, /* 8 bit monochrome */ vdfYUV444Planar = 0x00008000, }; /// <summary> /// 视频制式 /// </summary> ...
实验一 时间片轮转算法模拟程序<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 ...