similar to: error in trunc function (PR#9782)

Displaying 20 results from an estimated 10000 matches similar to: "error in trunc function (PR#9782)"

2005 Oct 27
2
Critical Bug in type conversions: as.integer, trunc, ... (PR#8255)
Full_Name: Grischa T?dt Version: 2.1.1 OS: windows XP Submission from: (NULL) (192.108.25.32) I have a strange behaviour in R, looks like type conversions are messed up. To reproduce: expected: > typeof(3) [1] "double" > as.integer(3) [1] 3 !!!! strange: > typeof((0.3/0.1)) [1] "double" > as.integer((0.3/0.1)) [1] 2 also for trunc: >trunc(c(5,7))
2008 Oct 28
1
Sweave Error
dear R users, I am using sweave to generate report for my data analysis. I recently updated R ro 2.8.0, and now I have the following results when compile the the tex file generated from R. This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) %&-line parsing enabled. entering extended mode (./Lajos.tex LaTeX2e <2005/12/01> Babel <v3.8h> and hyphenation patterns for english,
2009 Feb 12
3
trunc/floor a number -- strange bahaviour
Hi everybody, given a fresh rgui.exe load on winxp OS, I enter (a minimal exaple) n <- 12.357531 Then the following command: n <- (n - floor(n))*10; n gives the following outputs: [1] 3.57531 [1] 5.7531 [1] 7.531 [1] 5.31 [1] 3.1 [1] 1 === still as expected [1] 10 === not expected, count with me: 1 - floor(1) is zero, times 10 gives 0, not 10!!!! [1] 10 === should
2009 Sep 22
2
A couple of suggestions: source function (package base)
Hi, I've been calling the function "source" (package base) from Tinn-R editor to send files, marked blocks and selections to R interpreter because it avoids a lot of problems related with input/output synchronization in the Rgui output! The new RGedit plugin is also using this function in this way, and we are finishing a new version of a plugin to Vim (Vim-R-plugin2) which uses
2011 Sep 30
2
[LLVMdev] Definition of C/C++ integral conversion(was Re: nsw/nuw for trunc)
>> 3) If the destination type is signed, the value is unchanged if it >> can be represented in the destination type (and bit-field >> width); otherwise, the value is implementation-defined. >> ---------------------------------------------------- >> >> 4.7.3 suggest to me, that the standard does not define a result for >> '(signed char)
2017 Jul 04
4
trunc nsw/nuw?
Hi, > Hi Alexandre, > > LLVM currently doesn't have trunc nsw/nuw, no. > Which frontend would emit such instructions? Any application in mind? > Just asking because if no frontend could emit those, then the motivation to > add nsw/nuw support to trunc would be very low I guess. I think the clang frontend could use that to allow better static analysis of integer overflows on
2017 Jul 03
2
trunc nsw/nuw?
Hello, >From [1], trunc does not seems to have a nsw/nuw attribute. Is it possible to have that? Or do we have that and it is not up-to-date? The definition would be: If the nuw keyword is present, the result value of the trunc is a poison value if the truncated high order bits are non-zero. If the nsw keyword is present, the result value of the trunc is a poison value if the truncated high
2011 Mar 09
2
trunc function
Hello. I would like to know if there exists in R a function like trunc but where i can choose how many decimal places can I stay with in the number I have (sort of the same as the trunc function in excel). I would like, for example if I have the number 0.974678 and I choose to stay with 3 decimal places to have as ouput 0.974. Thank you Felipe Parra [[alternative HTML version deleted]]
2024 Feb 08
2
round.Date and trunc.Date not working / implemented
>>>>> Ji?? Moravec >>>>> on Wed, 7 Feb 2024 10:23:15 +1300 writes: > This is my first time working with dates, so if the answer is "Duh, work > with POSIXt", please ignore it. > Why is not `round.Date` and `trunc.Date` "implemented" for `Date`? > Is this because `Date` is (mostly) a virtual class setup for a
2011 Dec 30
3
[LLVMdev] InstCombine "pessimizes" trunc i8 to i1?
Am 29.12.2011 19:52, schrieb Reid Kleckner: > I think Chris is saying that the and is necessary because with your i1 > trunc you're ignoring all of the high bits. The and implements that. > If you don't want this behavior, don't generate the trunc in the > first place and just compare the full width to zero. But if a backend sees trunc from i8 to i1 it should know
2024 Feb 06
1
round.Date and trunc.Date not working / implemented
This is my first time working with dates, so if the answer is "Duh, work with POSIXt", please ignore it. Why is not `round.Date` and `trunc.Date` "implemented" for `Date`? Is this because `Date` is (mostly) a virtual class setup for a better inheritance or is that something that is just missing? (like `sort.data.frame`). Would R core welcome a patch? I decided to convert
2011 Dec 28
3
[LLVMdev] InstCombine "pessimizes" trunc i8 to i1?
>> Hi! >> >> before InstCombine (llvm::createInstructionCombiningPass()) I have >> a trunc from i8 to i1 and then a select: >> >> %45 = load i8* @myGlobal, align 1 >> %tobool = trunc i8 %45 to i1 >> %cond = select i1 %tobool, float 1.000000e+00, float -1.000000e+00 >> >> after instCombine I have: >> >> %29 = load i8*
2011 Dec 29
0
[LLVMdev] InstCombine "pessimizes" trunc i8 to i1?
I think Chris is saying that the and is necessary because with your i1 trunc you're ignoring all of the high bits. The and implements that. If you don't want this behavior, don't generate the trunc in the first place and just compare the full width to zero. Reid On Wed, Dec 28, 2011 at 6:45 AM, Jochen Wilhelmy <j.wilhelmy at arcor.de>wrote: > > >> Hi! >
2024 Feb 08
2
round.Date and trunc.Date not working / implemented
> On 8 Feb 2024, at 15:15, Martin Maechler <maechler at stat.math.ethz.ch> wrote: > >>>>>> Ji?? Moravec >>>>>> on Wed, 7 Feb 2024 10:23:15 +1300 writes: > >> This is my first time working with dates, so if the answer is "Duh, work >> with POSIXt", please ignore it. > >> Why is not `round.Date` and
2024 Feb 09
1
round.Date and trunc.Date not working / implemented
> This is a workaround, and could be the basis for a round.Date improvement: >?? date <- Sys.Date() >?? as.Date(round(as.POSIXct(date), "years")) >?? as.Date(round(as.POSIXct(Sys.Date() + 180), "years")) > Duncan Murdoch That would work, perhaps structured similarly as `trunc.Date` is. The only issue might be that `trunc.Date` is currently using
2017 Jul 05
2
trunc nsw/nuw?
On Wed, Jul 5, 2017 at 3:59 PM, Hal Finkel via llvm-dev < llvm-dev at lists.llvm.org> wrote: > > On 07/04/2017 01:41 AM, Dr.-Ing. Christoph Cullmann via llvm-dev wrote: > >> Hi, >> >> Hi Alexandre, >>> >>> LLVM currently doesn't have trunc nsw/nuw, no. >>> Which frontend would emit such instructions? Any application in mind?
2019 Jul 09
1
Segfault of doveconf
On 9.7.2019 13.40, Aki Tuomi via dovecot wrote: > > > On 9.7.2019 12.54, Claudio Prono wrote: >> >> On 4.7.2019 19.00, Claudio Prono via dovecot wrote: >> >> Sorry to bother again, but the problem persist. >> >> ? >> >> I have checked all the configurations of dovecot, and seems all >> ok, but randomly the segfault pops
2011 Dec 27
2
[LLVMdev] InstCombine "pessimizes" trunc i8 to i1?
Hi! before InstCombine (llvm::createInstructionCombiningPass()) I have a trunc from i8 to i1 and then a select: %45 = load i8* @myGlobal, align 1 %tobool = trunc i8 %45 to i1 %cond = select i1 %tobool, float 1.000000e+00, float -1.000000e+00 after instCombine I have: %29 = load i8* @myGlobal, align 1 %30 = and i8 %29, 1 %tobool = icmp ne i8 %30, 0 %cond = select i1 %tobool, float 1.000000e+00,
2017 Jan 12
2
IR canonicalization: shufflevector or vector trunc?
It's time for another round of "What is the canonical IR?" Credit for this episode to Zvi and PR31551. :) https://llvm.org/bugs/show_bug.cgi?id=31551 define <4 x i16> @shuffle(<16 x i16> %x) { %shuf = shufflevector <16 x i16> %x, <16 x i16> undef, <4 x i32> <i32 0, i32 4, i32 8, i32 12> ret <4 x i16> %shuf } define <4 x i16>
2012 Jun 15
2
POSIXlt and trunc
Hi, I'm having trouble understanding how trunc is operating on vectors of POSIXlt objects. Why does dates[1:4] in the last line return a bunch of NAs even though dates look like it has all the right elements? This worries me that something is off with my use of trunc. Is trunc not suppose to be vectorized with POSIXlt? If not, then how should I truncate a bunch of POSIXlt objects? I'm