search for: mantissa

Displaying 20 results from an estimated 78 matches for "mantissa".

2016 Apr 15
2
Integer -> Floating point -> Integer cast optimizations
My understanding is that this checks whether the bit width of the integer *type* fits in the bit width of the mantissa, not the bit width of the integer value. - CL > On Apr 14, 2016, at 6:02 PM, escha at apple.com wrote: > > We already do this to some extent; see this code in InstCombineCasts: > > // fpto{s/u}i({u/s}itofp(X)) --> X or zext(X) or sext(X) or trunc(X) > // This is safe if th...
2016 Apr 14
2
Integer -> Floating point -> Integer cast optimizations
...it as an example. - CL > On Apr 14, 2016, at 4:49 PM, Martin J. O'Riordan <martin.oriordan at movidius.com> wrote: > > I don't think that this is correct. > > | Let's say we have an int x, and we cast it to a float and back. Floats have 8 exponent bits and 23 mantissa bits. > > 'float', 'double' and 'long double' do not have specific representations, and a given implementation might choose different FP implementations for each. > > ISO C and C++ only guarantee that 'long double' can accurately represent all values th...
2016 Mar 02
2
Incorrect return values for APFloat::convertFromString?
I noticed some odd behavior with APFloat's convertFromString method. 1. If I pass the hex representation of the closest value to 0.1 (0x19999Ap-24), everything is fine and opOk is returned. However, if I pass the same value as a decimal string (0.10000002384185791015625), opInexact is set. 2. On the lower end of the scale, the smallest denormal 0x1p-149 returns opOk, but the
2009 Mar 18
4
[LLVMdev] decimal to floating point conversion
Hi all: I need an instruction that can convert decimal values into floating point numbers. i.e. say I have a decimal number 1110794174 (== 42355FBE in hex ) and (== 45.3435 as a float) essentially the mantissa and exponent representation needs to be used. Is there any way of doing this in llvm? Thanks and Regards -- -- Aparna Kotha Graduate Student Electrical and Computer Engineering University of Maryland, College Park -------------- next part -------------- An HTML attachment was scrubbed... U...
2016 Jul 28
2
Weighting Schemes: Implementing Piv+ Normalization
...tring normals = ptr++; or, const string normals = static_cast<const string>ptr++; fixes compile errors. But tfidfweight3 test case is failing with remote backends :- $ ./runtest gdb ./apitest -v tfidfweight3 Running test: tfidfweight3... SerialisationError: REMOTE:Bad encoded double: short mantissa (context: remote:prog(../bin/xapian-progsrv -t300000 .glass/db=apitest_simpledata) I'm wondering if I need to introduce a new method in serialise-double.h for string parameters (normalizations in this case)? To be honest, I have little idea about that part of Xapian so probably a workaround mi...
2011 Aug 10
1
Floats in Microsoft Basic format
...d char sign = 0x00; unsigned char ieee_exp = 0x00; int i; /* MS Binary Format */ /* byte order => m3 | m2 | m1 | exponent */ /* m1 is most significant byte => sbbb|bbbb */ /* m3 is the least significant byte */ /* m = mantissa byte */ /* s = sign bit */ /* b = bit */ sign = msbin[2] & 0x80; /* 1000|0000b */ /* IEEE Single Precision Float Format */ /* m3 m2 m1 exponent */ /*...
2008 Feb 19
0
Patch for Analog Devices compiler & fixed-point AGC
...an do a bunch of other things. Good! > Something else: > I need the AGC on my fixed-point platform, > I've looked at the code, I think I will do it, as it seems pretty easy: > - I can live with a few emulated floating point operations for gain > computation > - extract gain mantissa and exponent > - multiply fixed-point buffer by mantissa > - offset spectrum exponent before IFFT reconstruction > > What do you think ? It would be even better if you could do it with my pseudofloat macros. It defines a float approximation with 16-bit mantissa and 16-bit exponent. It...
2009 Jul 15
2
ifultools on ppc debian
I have tried to compile this from source. I don't know what Endianess is, but it is probably not debian power pc. Am I would of luck with this package? Stephen Sefick * Installing *source* package ?ifultools? ... ** libs gcc -std=gnu99 -I/usr/local/lib/R/include -I"../inst/include/" -D"MUTIL_STATIC" -D"DEF_TF" -D"INTERRUPT_ENABLE"
2008 May 20
2
[LLVMdev] Making use of SSE intrinsics
...= new StoreInst(y, ptr_y, false, basicBlock); Somewhat related to this, I'd also like to know how to 'reinterpret_cast' values. It can be quite useful to sometimes interpret a vector of floating-point values as a vector of integers (for instance to extract the sign, exponent and/or mantissa bits). Any information on how to do that would be much appreciated. Thanks, Nicolas Capens -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080520/a1db13b6/attachment.html>
2018 May 09
0
NAs produced by integer overflow, but only some time ...
a) Numeric values may be either integers (signed 32 bit) or double precision (53 bit mantissa). b) Double precision constants are numeric with no decoration (e.g. 61224). Integer constants have an L (e.g. 61224L). c) 61224*61224 > 2^31-1 so that answer cannot fit into an integer. d) Exponentiation is a floating point operation so the result of 61224L^2L is a floating point answer that...
2018 May 09
2
NAs produced by integer overflow, but only some time ...
Before responding to Jeff's posting, let me reiterate my question: Why does a function using m1*m1 produce an integer overflow, but m1^2 does not? As for Jeff's 'response': > a) Numeric values may be either integers (signed 32 bit) or double precision (53 bit mantissa). > b) Double precision constants are numeric with no decoration (e.g. 61224). Integer constants have an L (e.g. 61224L). > c) 61224*61224 > 2^31-1 so that answer cannot fit into an integer. > d) Exponentiation is a floating point operation so the result of 61224L^2L is a floating point...
2007 Mar 12
2
e2fsck hanging
I'm trying to run e2fsck on a ~6TB filesystem which is about 90% full. We're doing backup to disk to this filesystem, and have a number of hard links (link counts up to 90). strace shows: write(1, "Pass 2: Checking ", 17) = 17 write(1, "directory", 9) = 9 write(1, " structure\n", 11) = 11 mmap(NULL, 91574272,
2018 May 09
3
NAs produced by integer overflow, but only some time ...
I have problem with integer overflow that I cannot understand. I have a character vector curr.lemmas with the following properties: length(curr.lemmas) # 61224 length(unique(curr.lemmas)) # 2652 That vector is the input to the following function: yules.k1 <- function(input) { m1 <- length(input); temp <- table(table(input)) m2 <- sum("*"(temp,
2002 Jul 20
3
Vorbis 1.0 spec notes, part 1
...with 32-bit unsigned values (e.g. codebook_decode). Should I (a) cast all these unsigned values to signed, (b) alter ilog to take 32-bit unsigned only, or (c) implement ilog as 64-bit? * float32_unpack - step 3: "shifted left" -> "shifted right" (right?) - step 4: "if ( [mantissa] is nonzero )" -> "if ( [sign] is nonzero )" - question: What are the tolerances on this function? Is it acceptable for me to cast mantissa to double, multiply it by the double returned from pow(2,(dobule)(exponent-788)), and cast the result to float? * lookup1_values - given: r...
2016 Jul 29
2
Weighting Schemes: Implementing Piv+ Normalization
...;ve inferred the type of > `ptr` correctly). > > > But tfidfweight3 test case is failing with remote backends :- > > > > $ ./runtest gdb ./apitest -v tfidfweight3 > > > > Running test: tfidfweight3... SerialisationError: REMOTE:Bad encoded > > double: short mantissa (context: remote:prog(../bin/xapian-progsrv > -t300000 > > .glass/db=apitest_simpledata) > > You're deserialising something that wasn't serialised, or wasn't > serialised properly. > > If I put 'xapian bad encoded double short mantissa' into Google, I get...
2005 Aug 05
5
How to set the floating point precision beyond e-22?
...4 [81] -5.545949e+04 -8.077540e+04 -8.577861e+04 -1.329961e+05 -1.450908e+05 [86] -3.022353e+05 -4.015776e+05 As yout can see, the eigenvalues spread very much (between e+20 and e-13). We presume, that it has something to do with R's floating point precision, which I read is about 22-digits in mantissa as default. Can this precision be set to values above 22? The problem occurs especially when trying to perform 2SLS with the 'systemfit' package. There appears always an error message like the following from the inverting routine: solve(tcross) Error in solve.default(tcross) : Lapack rout...
2004 Apr 11
3
pcauchy precision (PR#6756)
Full_Name: Morten Welinder Version: snapshot OS: Submission from: (NULL) (65.213.85.129) Two things are wrong. 1. There is nan test outside IEEE_754. 2. The meat part of the function should really be something like... if (!lower_tail) x = -x; if (fabs (x) > 1) { double temp = atan (1 / x) / M_PI; return (x > 0) ? R_D_Clog (temp) : R_D_val (-temp); } else
2009 Mar 18
0
[LLVMdev] decimal to floating point conversion
aparna kotha wrote: > Hi all: > > I need an instruction that can convert decimal values into floating > point numbers. > > i.e. say I have a decimal number 1110794174 (== 42355FBE in hex ) and > (== 45.3435 as a float) > > essentially the mantissa and exponent representation needs to be used. > > > Is there any way of doing this in llvm? I think you're looking for "bitcast i32 1110794174 to float"
2010 Jun 03
0
[LLVMdev] Generating Floating point constants
...http://babbage.cs.qc.edu/IEEE-754/Decimal.html gives: >>> >>> 0x3FE999999999999A instead and this value cannot be read back by >>> "llc"... >> >> double precision Martin is right. Floats have only 36 significant bits (sign + 11 exponent + 24 mantissa) and are stored that way. (The exponent is in double format for some reason I've forgotten, probably because it was easier somewhere.) Any resemblance to IEEE-754/Decimal is coincidental. And no, I don't know of anybody else having trouble with this. Why can't you connect to...
2008 May 20
0
[LLVMdev] Making use of SSE intrinsics
...uilder.CreateStore(y, ptr_y); > Somewhat related to this, I'd also like to know how to 'reinterpret_cast' > values. It can be quite useful to sometimes interpret a vector of > floating-point values as a vector of integers (for instance to extract the > sign, exponent and/or mantissa bits). Any information on how to do that > would be much appreciated. Use the bitcast instruction (see http://llvm.org/docs/LangRef.html). -Eli