Intel 8087浮点芯片采用了一套精巧的三阶段算法来实现高精度正切运算,而非单纯依赖CORDIC方法1。通过对芯片物理层和微码的逆向分析,研究人员发现8087将CORDIC伪除法、有理多项式近似和CORDIC伪乘法三种技术相结合,其中这三个阶段的耗时占比分别约为33%、15%和47%1。
8087于1980年推出后,大幅提升了IBM PC等系统的浮点运算性能1。正切指令(FPTAN)的计算耗时约90微秒,相比基于8086处理器的软件实现的13,000微秒提速了约100倍1。值得注意的是,FPTAN指令返回的是分子分母比值(Y/X)形式,而非直接返回正切值1。
在具体实现中,8087采用16位CORDIC迭代达到约2^-16的精度,配合Padé有理多项式近似(3x/(3-x²))以实现64位精度1。FPTAN微码从地址#1039开始,由1648条16位指令组成,通常需耗费450个时钟周期执行,范围在30至540个周期之间1。芯片内部采用80位浮点数格式存储数据,包括1位符号、15位指数和64位尾数,指数偏置值为163831。CORDIC算法的设计理念源自1956年为B-58轰炸机导航计算机而开发的技术1。
A detailed analysis of the Intel 8087 floating-point coprocessor has revealed the sophisticated multi-stage algorithm underlying its tangent instruction (FPTAN) 1. Through physical chip reverse-engineering and microcode examination, researchers discovered that the 8087 combines CORDIC pseudo-division, rational polynomial approximation, and CORDIC pseudo-multiplication to achieve both high precision and performance in trigonometric calculations 1.
The 8087, introduced in 1980, dramatically accelerated floating-point operations for systems like the IBM PC 1. Computing a tangent value on the 8087 requires approximately 90 microseconds—roughly 100 times faster than the same operation in software on the 8086 processor, which took about 13,000 microseconds 1. The FPTAN instruction uniquely returns the tangent as a fraction in the form Y/X rather than a single direct value 1.
The algorithm's three-stage architecture divides computational effort across distinct components 1. The CORDIC pseudo-division phase occupies roughly 33 percent of execution time, while a rational polynomial approximation (Padé approximation of 3x/(3-x²)) accounts for approximately 15 percent, and CORDIC pseudo-multiplication consumes the remaining 47 percent 1. The 8087 employs 16-bit CORDIC iterations, achieving precision of approximately 2^-16, combined with rational polynomial approximation to deliver the full 64-bit precision 1. The microcode for FPTAN begins at address #1039 and spans 1,648 16-bit instructions, typically requiring 450 clock cycles, with execution time ranging from 30 to 540 cycles depending on input values 1. Internally, the 8087 represents floating-point numbers using an 80-bit format comprising one sign bit, 15 exponent bits, and 64 mantissa bits, with an exponent bias of 16,383 1. The CORDIC algorithm itself originated in 1956 as a design for the B-58 Hustler bomber's navigation computer 1.
评论
还没有评论,欢迎留下第一条。