作者:Henry S. Warren
出版社:Addison-Wesley Professional
出版年:2012-10-5
评分:9.2
ISBN:9780321842688
所属分类:行业好书
In Hacker's Delight, Second Edition, Hank Warren once again compiles an irresistible collection of programming hacks: timesaving techniques, algorithms, and tricks that help programmers build more elegant and efficient software, while also gaining deeper insights into their craft. Warren's hacks are eminently practical, but they're also intrinsically interesting, and sometimes unexpected, much like the solution to a great puzzle. They are, in a word, a delight to any programmer who is excited by the opportunity to improve. Extensive additions in this edition include * A new chapter on cyclic redundancy checking (CRC), including routines for the commonly used CRC-32 code * A new chapter on error correcting codes (ECC), including routines for the Hamming code * More coverage of integer division by constants, including methods using only shifts and adds * Computing remainders without computing a quotient * More coverage of population count and counting leading zeros * Array population count * New algorithms for compress and expand * An LRU algorithm * Floating-point to/from integer conversions * Approximate floating-point reciprocal square root routine * A gallery of graphs of discrete functions * Now with exercises and answers
-x=~x+1=~(x-1)~x=-x-1-(~x)=x+1~(-x)=x-1x+y=x-(~y)-1=(x^y)+2*(x&y)=(x|y)+(x&y)=2*(x|y)-(x^y)x-y=x+~y+1=(x^y)-2*(~x&y)=(x&~y)-(~x&y)=2*(x&~y)-(x^y)x^y=(x|y)-(x&y)x&~y=(x|y)-y=x-(x&y)~(x-y)=y-x-1=~x+yx恒等于y=(x&y)-(x|y)-1=(x&y)+~(x|y)x|y=(x&~y)+yx&y=(~x|y)-~x
——引自第10页
这里是介绍
——引自章节:算法心得
《你要去相信,没有到不了的明天》是一本给了百万读者力量的书。所有的黯淡都留给昨天,到了天亮我们就该苏醒。日历一页页翻过,所有的过去都在远离,所有的明天都在靠近。...
长尾智子,日本知名料理研究家,曾从事食谱开发、餐饮服务多年。主要作为料理顾问、咖啡店、餐馆的餐具设计师、撰稿人、策展人,活跃在料理出版领域。
疑难病症针药并治绝技 内容简介 本书精选疑难病症共72种,根据编著者在中国、美国、意大利、科威特等国家行医数十年的临床经验及教学实践体会,按中医四诊八纲辨证论治...
The sensational Dutch bestseller: Marieke Lucas Rijnevelds extraordinary portrai...
马里乌斯·詹森(Marius Jansen, 1922-2000),哈佛大学博士,普林斯顿大学荣誉教授,日本史、中日关系史专家。1969年创立普林斯顿大学东亚研...
妇人偏方230 内容简介 在我国传统的医学宝库中,独具特色的民间偏方秘方,以其药源易得、使用方便、价格低廉、疗效显著、易学易用易推广的特点,历代流传不衰。这些灿...
城市轨道交通网络主动客流控制理论与方法 内容简介 本书着重阐述了成网条件下轨道交通乘客选择特性的影响因素及建模方法,特别是面向AFC数据的乘客出发时间和出行路径...
精彩摘录211.周代墓葬出土的玉石圭、玉石戈确有形制大小的区别,但是这种差别拼不符合《周礼》的有关记载;就目前资料而言,周代
好莱坞一线摄影师、顶级灯光师实战经验倾囊相授美国影视业工会指定教材,片场布光必备技术宝典...................※编辑推荐※《灯光师圣经》是一本百...
阿嘉莎.克莉絲蒂(一八九○~一九七六)英籍女作家、劇作家。本名AgathaMayClarissaMiller,生於德望郡(Devon),家境富裕而傳
《全国会计专业技术资格考试考点串讲与经典题库:初级会计实务》内容简介:本书是为参加全国会计专业技术资格考试的人士量身定做的
江弱水1963年生,安徽青阳人。香港中文大学博士,浙江大学教授、博士生导师。有研究与评论著作《卞之琳诗艺研究》《抽思织锦》《中西同步与位移》《从王熙凤到波托西》...
1.高晓松作序推荐,体验“电影拉片”式阅读——高晓松序言说,本书读解《金瓶梅》之详尽,几乎与学电影时一个个镜头“拉片”相似,凡举结构、背景、隐喻、人物、故事、审...
国医大师朱良春-治疗疑难危急重症经验集 本书特色 方邦江、周爽主编的《国医大师朱良春:治疗疑难危急重症经验集》共分为七篇,分别从学术思想形成、专病论治、治法传薪...
作者簡介李滄東Lee Chang Dong作家、導演、編劇、製片人。他早年創作小說,曾獲得韓國日報創作文學獎。一九九七年棄筆從影,從小說家轉行為電影導演。代表作...
中华人民共和国民法典(硬壳精装大字版) 本书特色 本书为精装版本,封面采用精装糊壳,拼布烫银,内文采用80g胶型纸,经典大气,便于收藏。 中华人民共和国民法典(...
彭湃,青年作家、《紫色BOX》资深编辑、杂志平面模特。擅讲青春故事,国内公认最受女生欢迎的优质暖男。喜欢养猫、熬夜、追剧、旅行、写作、爱在微博写段子和煲鸡汤,江...
在这部日记体小说中,公司职员马丁·桑多梅记录了一个蒙得维的亚中产阶级黯淡日常生活:办公室日复一日的例行公事、妻子早逝后感情生活的长期空白、与三个已经成年的孩子住...
山路爱山(1865—1917),日本明治时期到大正时期的评论家、历史家。《国民新闻》的记者、《信浓每日新闻》和《国民杂志》的主编、《独立评论》的创刊人。日本国家...
《美国往事:好莱坞镜像与历史记忆》内容简介:本书的主要内容是分析好莱坞的电影作品,但没有采取逐一分析电影文本的方式,而是以