The tag has no usage guidance.

learn more… | top users | synonyms

-1
votes
1answer
61 views

Convert between IEEE 754-2008 decimal64 and IEEE double precision floating point number

I need to know the algorithm for converting between IEEE 754-2008 decimal64 and IEEE 754-1985 double precision floating point number. I have been working on this for the past 2 days and I match the ...
3
votes
3answers
45 views

Whether assigning of single precision IEEE754 float to double is reversible?

Using the IEEE754 standard, let's assign single precision variable s to double precision variable d and then assign d to single precision variable s'. Is this operation is reversible (lossless) for ...
3
votes
1answer
129 views

How to work out if an IEEE 754 floating point number is normalized?

How do I tell whether a particular IEEE 754 floating point number is a normalized floating point number? Is there some way to recognize an IEEE 754 normalized floating point number?
1
vote
0answers
22 views

Dual Signed Kahan Summation

NOTE: This is for a project I'm working on for fun, NOT production code. So I'm working on a pet project that involves reading data in from a sensor and summing it up. The values are mostly ...
1
vote
1answer
25 views

half precision floating point multiplication

A = 0 10011 0011110111 B = 1 00011 0010011000 exponent is 15, mantissa is 10 bits and first bit is implicit. Can somebody please tell me the final answer cause I am having trouble figuring ...
4
votes
0answers
22 views

Difference between ways to compare floating-point numbers

There seems to be many approaches to judge whether two floating-point numbers are identical. Here are some examples I've found: ...
3
votes
1answer
36 views

Approximate a float using a minimal fraction

This sounds like it's probably a well-known problem, but I haven't been able to find references to it by searching. Given a floating point value $x$ and an error range $\varepsilon$, how can I ...
10
votes
1answer
529 views

Implementation of Naive Bayes

I am implementing a Naive Bayes algorithm for text categorization with Laplacian smoothing. The problem I am having is that the probability approaches zero because I am multiplying many small ...
1
vote
1answer
37 views

Why do floating point additions sometimes produce equal results? [duplicate]

I have tried two sentences on my computer : 2 + 10^(-18) == 2 2^(-55) + 2^(-57) == 2^(-55) My computer gives TRUE and FALSE respectively. Why does the computer ...
0
votes
1answer
20 views

What happens if we add denormalized number and normalized number?

Denormalized numbers can represent numbers smaller than 2^(-1022) whereas normalized number cannot. So I'm curious what happens if we add denormalized number and normalized number. Actually, I have ...
0
votes
1answer
30 views

8-bit floating-point representation

I'm studying about representing fractional numbers as floating-point values. It is going to be an 8-bit representation. Somewhere in the text, it is said that: "We use the first bit to represent ...
3
votes
1answer
37 views

Smallest number close to 0 in IEEE754 (64bits)?

I thought the smallest number close to 0 would be : 0 00000000001 (exponent) 0000000000000000000000000000000000000000000000000000 (significand) But this site (http://binaryconvert.com/result_double....
0
votes
0answers
82 views

Calculating sums of floating point numbers by hand

how do you calculate the sum of 2.6125 * 10^1 and 4.150390625 * 10-1 by hand, assuming A and B are stored in the 16-bit half precision. i cant figure out how to do this by hand with out losing most of ...
2
votes
1answer
67 views

Distribution of IEEE 754 single precision floating point over number line

"What is the maximum and minimum difference between two successive real numbers representable in IEEE 754 Single Precision and Double Precision Floating Point Representations respectively?" In ...
0
votes
1answer
49 views

What is the 1's and 2's complement of 0.01101?

What is the 1's and 2's complement of 0.01101? I'm unable to find any details on this from google. Basically how do we represent the floating points in 1's and 2's complement forms? Even wikipedia ...
1
vote
1answer
69 views

Is < binary relation a strict partial order on IEEE doubles?

To me it looks that it is: irreflexivity: NaN < NaN == false transitivity: if a < b and b < c then a < c (the antecedent is never true for NaNs) asymmetry: if a < b then not b < a (...
4
votes
0answers
39 views

Representing Computations on Transcendental Numbers

Consider the set of transcendental numbers that are not compressible to a finite base-2 representation. How can I compute multiples (more generally, any algebraic computation) of one of these numbers,...
1
vote
0answers
29 views

Understanding exponential computation by digit recurrence

I've met in a book the following algorithm that computes the exponential: Input: $t, n$ ($n$ is the number of steps) Output: $E_n$ $\begin{array}{l} \mbox{define $t_0 = 0$ ; $E_0 = 1$} \\ \mbox{...
3
votes
1answer
68 views

Is “flops” a reliable measure of deciding computational capacity?

Is "flops" a reliable measure of deciding computational capacity? If we do matrix multiplication and matrix addition of the same size of matrix, do the flops remain the same? Referring to question ...
0
votes
2answers
245 views

Why are transcendental functions of large numbers inaccurate on computers?

For instance, why is it hard to accurately compute sin(1e99)? I suspect it has something to do with rounding error.
2
votes
0answers
35 views

Normalised Floating Point System

I have a floating point number system and I have a number for which I need to calculate the exact relative error after rounding. The number is clearly an overflow. Does anyone know what I should do? ...
2
votes
1answer
640 views

Hex Bit Pattern to IEEE 754 standard Floating Point Number

The question asks for the decimal number that 0x0C000000 represents if it is a floating number. I'm not too sure on how to approach this, but here's my thought process: 0x0C000000 = 0000 1100 0000 ...
1
vote
1answer
60 views

floating point rounding (1/x)*x

I'm trying to figure out what the smallest positive integer x such that the floating point expression round(round(1/x)*x) is not equal to 1 in single precision. I have that the answer is 41, but when ...
2
votes
2answers
137 views

Floating point normalised numbers in binary

Many text books state that for a binary floating point representation in a computer byte, that if the mantissa is normalised, then a positive number must start with 01 from the left or a negative ...
2
votes
2answers
103 views

Why is there more frequent overflow in normalised Floating Point

I read that overflow is more frequent when we work with normalised mantissas. Why is this? Is it because when we adopt a normalised representation, our range is smaller than in a unnormalised ...
2
votes
2answers
123 views

Controlling overflow and loss of precision during floating point multiplication

I have a large number of floating point numbers (~10,000 numbers) , each having 6 digits after decimal. Now, the multiplication of all these numbers would yield about 60,000 digits. But the double ...
6
votes
2answers
65 views

Program transformations for numeric stability

There's tons of research on program transformations for optimization. Is there any research on transformations that improve numeric stability? Examples of such transformations might include: ...
1
vote
0answers
31 views

Why have only 15 bits been apportioned for the exponent in the 128-bit quad-precision datatype?

I look forward to the day we can start using quad-precision numbers, but was disappointed to see that in the specification, only 15 bits out of a whopping 128 were assigned to the exponent as shown by ...
1
vote
1answer
239 views

Why doesn't the binary fraction representation match the decimal fraction representation?

The Problem: What value does the hexadecimal number x55544552 represent in data type IEEE floating point? My Work:     I first wrote out that hexadecimal number in binary and got ...
1
vote
1answer
97 views

Convert 24(decimal) to modified IEEE 754 floating point format?

Here's what I have as the tweaked format I'm to use: S EEE MMMM (excess 8 format) s = sign bit, E = exponent bits, M = mantissa/fraction bits Otherwise, it follows the IEEE 754 in principle. The ...
2
votes
2answers
246 views

What does normalizing with hidden bit really mean?

I have a question related to representing numbers in base 2 with floating point. For example, if I have such a number $$0.000011 \cdot 2^3$$ then is its normalized form this? $$1.1\cdot 2^{-2}$$ ...
1
vote
1answer
41 views

Normalising fractional numbers

For example $-\tfrac9{16}$. $$\tfrac{9}{16} = \tfrac{1}{16}+\tfrac12 = 0.1001\,,$$ which when normalised becomes $0.1001\times 2^0$. Can its mantissa be $0.0001001$ in 8 bits? If so, as $-\tfrac9{16}...
1
vote
1answer
156 views

Interpretation of '1/3' in IEEE floating point representation

For a rational number 1/3 below is the floating point representation(64 bit) of decimal expansion 0.3333333.... As per the above bit structure, I would like to ...
2
votes
1answer
61 views

What is 0.1 converted to 8bit IEEE754?

0.1 via $32\text{ bit}$ is rather easy: Sign: $0_2 = 0_{10}$ Exponent: $123_{10} = 01111011_2$ Mantissa: $5033165_{10} = 100110011001100110011001101_2$ Now, how do you calculate this, if you've ...
0
votes
1answer
58 views

Problem on Floating Point Representation

Consider the floating-point representation 31-24 : Exponent 23-0 : Mantissa The exponent is in 2's complement representation and mantissa is in the sign ...
0
votes
1answer
47 views

Rounding errors when converting floats to integers

Is it possible to have a rounding error when you convert a floating point number which can only be in increments of 0.01 to an integer by multiplying by 100 first? I would think that the lack of ...
2
votes
2answers
117 views

What's the algorithm for floating points equality test?

I've found that 0.1 + 0.2 == 0.3 is not true in Java (see this demo). So, I'm interested in how equality testing can be implemented for floats. Is there a ...
1
vote
0answers
30 views

Addition in IEEE 754

Hi I have this simple question. When adding a positive number with a negative number, both of same exponent. Imagine that after complementing the negative we have something like this: 1.111 + 0.001 .....
-2
votes
1answer
44 views

Product with floating point [closed]

I was studying the product with floating point and I saw this example. I made the translation, sorry if something is not grammatically correct. ![enter image description here][1]
0
votes
1answer
47 views

Machine epsilon vs least positive number

What is the difference between machine epsilon and least positive number in floating point representation? If I try to show the floating point number on a number line .Is the gap between exact 0 and ...
1
vote
1answer
41 views

Why is the precision of floating point numbers worse for smaller numbers?

Why is the machine error/epsilon higher between a pair of two lower numbers than a pair of two high numbers? For example, between the two smallest numbers possible in 5 bit mantissa and the two ...
2
votes
2answers
119 views

Gap between numbers in fixed-point vs. floating point arithmetic

If $r$ is a machine-representable number and $f(r)$ is the next larger machine representable number, are the following true or false? In fixed-point arithmetic, the distance between $r$ and $f(r)$ ...
9
votes
9answers
2k views

Represent a real number without loss of precision

Current floating point (ANSI C float, double) allow to represent an approximation of a real number. Is there any way to represent real numbers without errors? Here's an idea I had, which is anything ...
1
vote
1answer
50 views

Floating point operations; Exception, Flags, and Trap Handlers

I am reading over the article found here specifically §D.4.4 Exceptions, Flags and Trap Handlers and am confused by the table D-4 in that section. Specifically the arguments sent to the trap handler ...
2
votes
1answer
387 views

Will floating point code return the same arithmetical results on two different computers?

Say I am using boost or the built-in float or double mathematical libraries of my C++ compiler. I distribute the program. Will the execution of my C++ program on different machines given different ...
0
votes
1answer
30 views

floating point normalised value of -1

I have, lets say, 8 bits mantissa and 4 bit exponent. Then, -1=1111 1111 there are no 0s so how can I normalise -1 in 2's complement form?
8
votes
0answers
148 views

Why does floating point modulus exactness matters?

Most Smalltalk dialects currently implement a naive inexact floating modulus (fmod/remainder). I just changed this to improve Squeak/Pharo and eventually other Smalltalk adherence to standards (IEEE ...
3
votes
1answer
88 views

Can we improve the precision of IEEE floats by dropping leading zeros in the mantissa?

It seems like it would be possible to add more precision to the IEEE 32-bit mantissa system if the leading zeroes were also dropped, just like the leading 1 is dropped due to it being implicitly known....
3
votes
2answers
62 views

Floating point format: why must `1−emax ≤ q+p−1 ≤ emax`?

From the Wikipedia page on the IEEE Standard for Floating-Point Arithmetic, The possible finite values that can be represented in a format are determined by the base (b), the number of digits in ...
0
votes
2answers
130 views

Problem in finding the floating point representation?

So, i was trying: $(-10.75)_{10}$ and to convert it into 32 bit binary floating point representation. i did this: According to IEEE standard: $(-1)^{-s} * 1.M * 2^{E-bias} $ ...