Something what you should know (floating point)

Here is the doc for the important idea about the
floating points powered by oracle

doc. website

http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html

Abstract:

Floating-point arithmetic is considered an esoteric subject by many people. This is rather surprising because floating-point is ubiquitous in computer systems. Almost every language has a floating-point
datatype; computers from PCs to supercomputers have floating-point accelerators; most compilers will be called upon to compile floating-point algorithms from time to time; and virtually every operating system must respond to floating-point exceptions such
as overflow. This paper presents a tutorial on those aspects of floating-point that have a direct impact on designers of computer systems. It begins with background on floating-point representation and rounding error, continues with a discussion of the IEEE
floating-point standard, and concludes with numerous examples of how computer builders can better support floating-point.

Categories and Subject Descriptors: (Primary) C.0 [Computer Systems Organization]: General --
instruction set design; D.3.4 [Programming Languages]: Processors --
compilers, optimization
; G.1.0 [Numerical Analysis]: General -- computer arithmetic, error analysis, numerical algorithms (Secondary).

D.2.1 [Software Engineering]: Requirements/Specifications --
languages; D.3.4 Programming Languages]: Formal Definitions and Theory --
semantics; D.4.1 Operating Systems]: Process Management -- synchronization.

General Terms: Algorithms, Design, Languages

Additional Key Words and Phrases: Denormalized number, exception, floating-point, floating-point standard, gradual underflow, guard digit, NaN, overflow, relative error, rounding error, rounding
mode, ulp, underflow.

Introduction

Builders of computer systems often need information about floating-point arithmetic. There are, however, remarkably few sources of detailed information about it. One of the few books on the subject,
Floating-Point Computation by Pat Sterbenz, is long out of print. This paper is a tutorial on those aspects of floating-point arithmetic (floating-point
hereafter) that have a direct connection to systems building. It consists of three loosely connected parts. The first section,
Rounding Error, discusses the implications of using different rounding strategies for the basic operations of addition, subtraction, multiplication and division. It also contains background information on the two methods of measuring rounding error, ulps
and relative error. The second part discusses the IEEE floating-point standard, which is becoming rapidly accepted by commercial hardware manufacturers. Included in the IEEE standard is the rounding method for basic operations. The
discussion of the standard draws on the material in the section Rounding Error. The third part discusses the connections between floating-point and the design of various aspects of computer systems. Topics include instruction set design, optimizing compilers and exception handling.

I have tried to avoid making statements about floating-point without also giving reasons why the statements are true, especially since the justifications involve
nothing more complicated than elementary calculus. Those explanations that are not central to the main argument have been grouped into a section called "The Details," so that they can be skipped if desired. In particular, the proofs of many of the theorems
appear in this section. The end of each proof is marked with the
z symbol. When a proof is not included, the
z appears immediately following the statement of the theorem.

时间: 2024-10-12 21:46:44

Something what you should know (floating point)的相关文章

从头搭建Openstack运行环境(五)--虚机添加floating ip

6.虚机添加floating ip 为虚机添加floating ip的功能是在neutron网络功能中非常重要的一项,在虚机创建完成后,如果此虚机所在的网络已经加入一个与外网的router中,那这个虚机可以通过SNAT的方式直接访问外网,但外网用户无法访问进虚机.如果想让外网用户访问虚机需要为虚机分配外网的floating ip.以下是为vm4虚机分配外网ip的具体步骤: 1)fixip与floating ip对应 vm4  fixip:10.0.2.84  floating ip:10.255

Floating IP in OpenStack Neutron

前言 Floating IP 是相对于Fixed IP而言的,它一般是在VM创建后分配给VM的,可以达到的目的就是,外界可以访问通过这个Floating Ip访问这个VM,VM也可以通过这个IP访问外界. 在OpenStack中,这个Floating IP使用了namespace内的iptables建立NAT 转发机制来达到VM与外界的通讯的.这片文章主要讲述如何使用OpenStack搭建和使用Floating IP. Environment Setup Ubuntu 14.04 LTS 2个网

What floating point types are available in .NET?

The C# standard only lists double and float as floating points available (those being the C# shorthand for System.Double and System.Single), but the decimal type (shorthand for System.Decimal) is also a floating point type really - it's just it'sdeci

(原创)Linux下的floating point exception错误解析

很多人也许都碰到过这样的错误:linux下程序刚一运行就报错:Floating point exception. 其实这个问题很容易排查,绝大多数情况情况都是逻辑的问题,如:c = a/b;或 c = a%b; 如果这里面的b不小心是0,则一定会出现Floating point exception的问题,大家可以检查检查啦!哈哈! 当然也有可能是版本的原因:同一个程序在一台高版本Linux上运行时没有问题,而在另一台低版本机器上运行报Floating Point Exception时,那么这极有

创建 floating IP - 每天5分钟玩转 OpenStack(106)

先复习一下前面我们讨论的知识. 当租户网络连接到 Neutron router,通常将 router 作为默认网关.当 router 接收到 instance 的数据包,并将其转发到外网时: 1. router 会修改包的源地址为自己的外网地址,这样确保数据包转发到外网,并能够从外网返回. 2. router 修改返回的数据包,并转发给真正的 instance. 这个行为被称作 Source NAT. 如果需要从外网直接访问 instance,则可以利用 floating IP.下面是关于 fl

The Quantum L3 router and floating IPs

This post shows how the Quantum L3 Agent uses the Linux IP stack to implement the Quantum L3 Routing and NAT API extensions. It explains in detail how external access with floating IP works and how it can be debugged. The setup is from the Grizzly on

floating IP 原理分析 - 每天5分钟玩转 OpenStack(107)

上一节我们通过 Web UI 创建为 cirros-vm3 分配了浮动 IP,今天将分析其工作原理. 首先查看 router 的 interface 配置: 可以看到,floating IP 已经配置到 router 的外网 interface qg-b8b32a88-03 上. 查看 router 的 NAT 规则: iptables 增加了两条处理 floating IP 的规则: 1. 当 router 接收到从外网发来的包,如果目的地址是 floating IP 10.10.10.3,将

uva 1530 - Floating Point Numbers(数论)

题目链接:uva 1530 - Floating Point Numbers 题目大意:给出一个16位的二进制数,用来表示一个浮点数,第一位为符号,1~7位表示一个十进制的数s,e=63-s;剩下的8位为小数部分,默认整数部分为1,得到f,然后最后a=f*2^e,要求用科学计数法输出a. 解题思路:模拟就好了,注意0的情况特殊处理,以及科学计数法的整数部分不能为0. #include <cstdio> #include <cstring> #include <cmath>

通过 floating IP 访问 VIP - 每天5分钟玩转 OpenStack(126)

前面我们是直接用 curl 测试 VIP,在更为真实的场景中通常会使用 floating IP 访问 VIP. 下面我们给 VIP 关联一个 floating IP,再进行测试. 访问 Project -> Compute -> Access & Security,打开 Floating IPs 标签页,点击 "Allocate IP to Project" 按钮. 在下拉列表中选择 "ext_net",Neutron 将从该网络中分配 floa

如何利用Heartbeat与Floating IP在Ubuntu 14.04上创建高可用性设置

提供 ZStack社区 内容简介 Heartbeat是一款开源程序,负责将集群基础设施容量--包括集群成员与消息收发--交付至客户服务器.Hearbeat在高可用性服务器基础设施当中扮演着关键性角色.我们通常需要将Heartbeat与Pacemaker等集群资源管理器(简称CRM)相结合,从而实现完整的高可用性设置.不过在今天的教程中,我们将演示如何利用Heartbeat与DigitalOcean Floating IP轻松创建一套双节点高可用性服务器设置. 如果大家希望进一步提升可用性水平,不