Questions tagged [mantissa]

The mantissa of a floating-point number is the value m in the representation m × 2ᵉ, where e is the exponent. Use this tag for questions specifically about the mantissa of a floating-point number. For questions about floating-point numbers, use the [floating-point] tag instead. Do not use this tag for questions relating to the Divmod Mantissa application server.

The mantissa or significand of a floating-point number is the value m in the representation m × 2e, where e is the exponent.

60 questions
1
vote
1 answer

Cocoa: NSDecimalNumber with mantissa and exponent of 0

Mathematically any number with an exponent of 0 is supposed to equal 1 (my remedial math research assures me). But this code produces 5: [NSDecimalNumber decimalNumberWithMantissa:5 exponent:0 isNegative:NO] Is this something standard in computer…
NewMath
  • 19
  • 2
1
vote
1 answer

Binary -> Signed Mantissa

How do I write 0xFA in signed mantissa. I converted it to binary = 1111_1010. Not sure where to go from here. The question is "If the register file has 8 bits width total, write the following in signed mantissa." Also, an explanation of signed…
user1402221
1
vote
1 answer

Reduce mantissa bit-width

Well, I feel embarrassed I cannot get this by my own, but.. How can I reduce the mantissa (and exponent) bit-with for a floating point number? I am training a (convolutional) artificial neural network (and I'm implementing it on FPGA) and I'd like…
Atcold
  • 683
  • 2
  • 10
  • 31
1
vote
3 answers

Return the mantissa as bits

I got a bit trouble with my c code. I am trying to extract the sign, exponent and the mantissa. So far it worked out for sign and exponent. The problem begins with mantissa. For example, let's take -5.0. 1 bit for sign, 8 bits for the exponent and…
Hagi
  • 87
  • 1
  • 1
  • 5
1
vote
0 answers

Android EditText for Decimal Values does not allow changing mantissa

In my android application I use an EditText for decimal values:
Searles
  • 1,447
  • 1
  • 11
  • 26
1
vote
2 answers

Parsing a floating point number with mantissa in Java

Using the standard Java Double class to parse a floating point number with mantissa seems to omit the + sign from the exponent. For example: Double.parseDouble("1258124354E-28") returns 1.258124354E-19, but Double.parseDouble("1243544322E+24")…
PNS
  • 19,295
  • 32
  • 96
  • 143
0
votes
1 answer

How to print a float with underscores separating thousandths?

If possible, i want to format (via f-string or any older way) a float, so that it's thousandths get separated by underscores. I know you can do: print(f"{10000000:_}") # 10_000_000 But i want: print(f"{7.012345678:}") # 7.012_345_678
0
votes
1 answer

How to convert a E notation string to a float with fixed exponent in python

My instrumentation device returns strings of data such as 2.89E-6, 9.87E-1, 4.18E-4 etc. How can I change the representation such that the exponent is always -3. My intention is to manually extract the Mantissa of the resultant expression. Desired…
Sinha
  • 431
  • 1
  • 5
  • 12
0
votes
0 answers

Mantissa size of double variable compile with GCC in Intel® Atom™

I'am runing a C++ software with double variables. My platform is upboard with an Intel® Atom™ x5-z8350 (1.92 GHz). The OS is Ubuntu server 18.04 and I compile the software with GCC 7.5.0. I compile my .cpp only with the optimization flag -o2. How…
Gabriel Laupre
  • 151
  • 1
  • 9
0
votes
0 answers

How to get a bigger mantissa in Python programming language?

I'm trying to make an animation of Feigenbaum's chaos. I try to program 600 images where I dive into the chaos of the image and then make them animated with MakeAvi. I have an mpmath library from Python, but it still feels like the value of the 10…
0
votes
1 answer

pd.DataFrame cuts the decimals' mantissa

Need to convert list of values with long mantissa into pd.DataFrame without precision lost: My list of decimals: The way pd.DataFrame convert it.
Axmed
  • 41
  • 4
0
votes
1 answer

bitwise splitting the mantissa of a IEEE 754 double? how to access bit structure,

(sorry, I'm coming up with some funny ideas... bear with me...) Let's say I have a 'double' value, consisting of: implicit sign exponent bit mantissa 0 10000001001…
0
votes
1 answer

Floating-point mantissa and exponent base 2

I'm trying to understand how to get the mantissa and the exponent in this case. Here's an example I have in my book. I have this formula (-1)^s * (1 + M) * b^E-e = x s = 0 or 1 (the sign) M = mantissa b = base (In this case 2) E = the exponent of…
proxima
  • 23
  • 1
  • 5
0
votes
1 answer

I want to know how to approach these functions in C. I have tried solving them but failed

#include #include #include //-- Sign related constants --// // PURPOSE: To be the mask to only keep the sign bit. const int SIGN_MASK = 0x80000000; // PURPOSE: To tell…
Koko
  • 57
  • 6
0
votes
1 answer

8bit floating point to decimal fraction

I have a float number stored in 1 byte( as floatin point in 8 bits). Do we have a library function in boost or c++11 (or 14), which would convert the floating point number into decimal fraction? I know how to convert the 8 bits( sign bit, exponent,…
sakthivp
  • 21
  • 4