- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在英特尔处理器上,x87 trigonometric instructions such as FSIN have limited accuracy due to the use of a 66-bit approximation of pi即使计算本身对于 80 位扩展精度浮点值的完整 64 位尾数也是准确的。 (所有有效输入的完全准确性需要 pi 的 128 位近似值。)英特尔文档中的遗漏是 corrected问题引起他们的注意后。
但是,除了在 AMD64 Architecture Programmer's Manual, Volume 1 中提到的之外,我找不到有关 AMD 实现 x87 三角函数指令准确性的类似详细信息。 :
6.4.5.1 Accuracy of Transcendental Results
x87 computations are carried out in double-extended-precision format, so that the transcendental functions provide results accurate to within one unit in the last place (ulp) for each of the floating-point data types.
最佳答案
我发现一个程序位于 http://notabs.org/fpuaccuracy/ ( direct download link ; GPLv3) 旨在测试 x87 三角函数指令的准确性。 fpuaccuracy examples
的引用输出随程序提供,使用 Intel Core i7-2600 (Sandy Bridge) 生成,如下所示:
sin with smallest failing argument
argument 4000 C10A 7DC0 DC46 D753 (decimal 3.0162653335001840718)
actual 3FFB FFFF BBF1 3588 24AF (decimal 0.1249994929300478145)
x87 fpu 3FFB FFFF BBF1 3588 24AE (decimal 0.12499949293004781449)
error -1.0002171407788819287 ulp
sin near pi
argument 4000 C90F DAA2 2168 C235 (decimal 3.1415926535897932385)
actual BFBE ECE6 75D1 FC8F 8CBB (decimal -5.0165576126683320235E-20)
x87 fpu BFBF 8000 0000 0000 0000 (decimal -5.42101086242752217E-20)
error -1376283091369227076.6 ulp
sin with large argument
argument 403D FFFF FFFF 2D2A 9042 (decimal 9223372035086174241)
actual BFDF E730 CF55 1180 63F3 (decimal -4.2053336735954077951E-10)
x87 fpu BFF8 C28B 4641 7452 B463 (decimal -0.011874025925697012908)
error -4.7037861121081250351E+26 ulp
cos with smallest failing argument
argument 3FFF C10E 8AC0 BFEB 5E80 (decimal 1.5082562867317745453)
actual 3FFA FFFF 3EA3 D2D7 355B (decimal 0.062499279677629184442)
x87 fpu 3FFA FFFF 3EA3 D2D7 355A (decimal 0.062499279677629184438)
error -1.005468872258621479 ulp
cos near pi/2
argument 3FFF C90F DAA2 2168 C235 (decimal 1.5707963267948966193)
actual BFBD ECE6 75D1 FC8F 8CBB (decimal -2.5082788063341660117E-20)
x87 fpu BFBE 8000 0000 0000 0000 (decimal -2.710505431213761085E-20)
error -1376283091369227076.6 ulp
cos with large argument
argument 403D FFFF FFFF 6CE1 B432 (decimal 9223372035620657689)
actual 3FDD DFD2 E369 AE25 7E4A (decimal 1.0178327217734091432E-10)
x87 fpu BFF8 C28B 45B2 1490 D117 (decimal -0.011874025404105249357)
error -1.8815144449581111989E+27 ulp
tan with smallest failing argument
argument 3FFF B8B5 07B4 294A BD53 (decimal 1.4430245999997931928)
actual 4001 F915 0EE5 BAC8 446C (decimal 7.7838205801874740721)
x87 fpu 4001 F915 0EE5 BAC8 446D (decimal 7.7838205801874740726)
error 1.0017725812707024772 ulp
tan near pi/2
argument 3FFF C90F DAA2 2168 C235 (decimal 1.5707963267948966193)
actual C040 8A51 E04D AABD A35F (decimal -39867976298117107068)
x87 fpu C040 8000 0000 0000 0000 (decimal -36893488147419103232)
error 743622037674500958.81 ulp
tan with large argument
argument 403D FFFF FFFF DCF6 FE38 (decimal 9223372036560879388)
actual 4005 A86C 499C 14EA BD4A (decimal 84.211499097398127292)
x87 fpu 401F C10C D618 50D5 E957 (decimal 6477687856.6315280604)
error 9.3353319161898434351E+26 ulp
sin with smallest failing argument
argument 4000 C10A 7DC0 DC46 D753 (decimal 3.0162653335001840718)
actual 3FFB FFFF BBF1 3588 24AF (decimal 0.1249994929300478145)
x87 fpu 3FFB FFFF BBF1 3588 24AE (decimal 0.12499949293004781449)
error -1.0002171407788819287 ulp
sin near pi
argument 4000 C90F DAA2 2168 C235 (decimal 3.1415926535897932385)
actual BFBE ECE6 75D1 FC8F 8CBB (decimal -5.0165576126683320235E-20)
x87 fpu BFBF 8000 0000 0000 0000 (decimal -5.42101086242752217E-20)
error -1376283091369227076.6 ulp
sin with large argument
argument 403D FFFF FFFF 2D2A 9042 (decimal 9223372035086174241)
actual BFDF E730 CF55 1180 63F3 (decimal -4.2053336735954077951E-10)
x87 fpu BFF8 C28B 4641 7452 B463 (decimal -0.011874025925697012908)
error -4.7037861121081250351E+26 ulp
cos with smallest failing argument
argument 3FFF C10E 8AC0 BFEB 5E80 (decimal 1.5082562867317745453)
actual 3FFA FFFF 3EA3 D2D7 355B (decimal 0.062499279677629184442)
x87 fpu 3FFA FFFF 3EA3 D2D7 355A (decimal 0.062499279677629184438)
error -1.005468872258621479 ulp
cos near pi/2
argument 3FFF C90F DAA2 2168 C235 (decimal 1.5707963267948966193)
actual BFBD ECE6 75D1 FC8F 8CBB (decimal -2.5082788063341660117E-20)
x87 fpu BFBE 8000 0000 0000 0000 (decimal -2.710505431213761085E-20)
error -1376283091369227076.6 ulp
cos with large argument
argument 403D FFFF FFFF 6CE1 B432 (decimal 9223372035620657689)
actual 3FDD DFD2 E369 AE25 7E4A (decimal 1.0178327217734091432E-10)
x87 fpu BFF8 C28B 45B2 1490 D117 (decimal -0.011874025404105249357)
error -1.8815144449581111989E+27 ulp
tan with smallest failing argument
argument 3FFF B8B5 07B4 294A BD53 (decimal 1.4430245999997931928)
actual 4001 F915 0EE5 BAC8 446C (decimal 7.7838205801874740721)
x87 fpu 4001 F915 0EE5 BAC8 446C (decimal 7.7838205801874740721)
error 0.0017725812707024772387 ulp
tan near pi/2
argument 3FFF C90F DAA2 2168 C235 (decimal 1.5707963267948966193)
actual C040 8A51 E04D AABD A35F (decimal -39867976298117107068)
x87 fpu C040 8000 0000 0000 0000 (decimal -36893488147419103232)
error 743622037674500958.81 ulp
tan with large argument
argument 403D FFFF FFFF DCF6 FE38 (decimal 9223372036560879388)
actual 4005 A86C 499C 14EA BD4A (decimal 84.211499097398127292)
x87 fpu 401F C10C D618 50D5 E957 (decimal 6477687856.6315280604)
error 9.3353319161898434351E+26 ulp
关于floating-point - FSIN 和其他 x87 三角函数指令在 AMD 处理器上的准确性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60267049/
AMD 似乎是按需加载 javascript 模块的最佳实践。 这应该适用于用户仅使用一部分可用功能的大型网络应用程序。 我读过有关优化器的信息,它将所有必需的模块连接到一个文件中,并且我读过有关无优
我在一个项目中使用 requirejs,并且有 2 个模块: a.js:是一个非 AMD 模块,我无法触及其代码 b.js:是我用 define() 函数编写的 AMD 模块。它需要 a.js 才能工
有没有办法导入或注释 Typescript 模块,以便在生成 AMD 兼容模块时自动将外部 AMD 模块作为依赖项包括在内?: tsc --module AMD example.ts 我尝试同时包含一
在我的项目中,有一个自定义第三方库(单个构建文件),他们使用几个非 AMD 和 AMD 文件创建了该库。并且大多数属性直接暴露给窗口对象。在我们的项目中,根据新的要求,我们必须使用 requireJS
我正在尝试创建一个由许多小文件(编译为 JavaScript-AMD 模块的 TypeScript 文件)构建的单个 AMD 库(模块)文件。 问题是: 我在类之间有循环依赖。 ( parent 需要
我有一个库 - 称之为 SomeLib - 它被定义为支持各种模块加载器: (function(global, factory) { if (typeof define === 'functi
一个星期以来,我开始学习如何将 require.js 与 Backbone.js 和 Underscore.js 一起使用。 这是一个非常困难的东西,但 3 天前我读到 Underscore 将不再支
main-bower-files无法抓取backbone-amd和underscore-amd ,有什么想法为什么以及如何解决它吗? gulpfile.js var mainBowerFiles =
我正在尝试使用 perf在我的带有 AMD cpu 的设备上,但我真的找不到任何关于如何获取的信息,比如说,cache-misses来自 AMD。我读到你需要写 -e rNNN ,其中 NNN是事件的
我对 AMD 波前和 OpenCL 的工作组大小的术语有些困惑。 我发现不同的来源做了不同的陈述。 我的问题是:AMDs GCN 技术的波前大小是多少,根据这个:opencl 上的工作组至少应该有多大
我正在尝试使用 Intern 测试 Require.js 项目。我在测试中遇到错误,其中在加载 jQuery 插件时未定义 jQuery。我的加载器配置如下所示: loader: { // A
Closed. This question does not meet Stack Overflow guidelines。它当前不接受答案。 想要改善这个问题吗?更新问题,以便将其作为on-topi
Modernizr 是使用 AMD 定义编写的,这很好,因为这就是我当前项目所使用的,并且可以在需要时引入 Modernizr 依赖项。问题是,Modernizr 模块都需要一个平面文件夹层次结构,但
AMD 不久前宣布推出 Fusion 平台。读了一些相关内容后,我既兴奋又怀疑。例如,它应该使 GPU 和 CPU 共享相同的内存成为可能。 (GPU 和 CPU 都在同一个封装中)现在,由于 GPU
当我从 Android Studio 启动 AVD 时,它长时间显示黑色空白屏幕并且我看不到主屏幕。我查看了 2013 年之前的几个 Stack Overflow 帖子(Virtual Machine
AMD 是否允许您定义一个模块,其导出是动态的,具体取决于其他模块? 我遇到的问题是,即使正文中有 require 调用,define 也会立即返回。这意味着,如果模块的定义依赖于其他模块,则任何依赖
假设我有一个加载模块myModule的应用程序。所述模块需要一些其他资源才能工作(例如模板),因此 myModule 关心加载它所需的资源,这很巧妙。实际上,这很简单: // main.js requ
AMD 规范中是否有任何内容规定必需的模块必须提供相同的对象?假设所需的模块是提供给所有需要的模块的单个实例,这似乎是相当常见的做法,但是有什么可以防止模块加载器将加载的模块仅视为缓存(可能在某个时候
所以我现在一直在使用 require.js,但我意识到我实际上并不知道它在幕后是如何工作的。它说它是一个 AMD 加载器。 我知道 CommonJS 是同步的,这意味着它会在加载时阻止其他代码的执行。
有没有办法从*.ts 中设置编译模块的名称?一些 tsconfig、json 设置或一些可以执行此操作的 Gulp 插件。 目前我得到 define([], function(){ .. }) 但我不
我是一名优秀的程序员,十分优秀!