search for: sdiv_int

Displaying 3 results from an estimated 3 matches for "sdiv_int".

2013 Apr 06
0
[LLVMdev] Integer divide by zero
On Apr 5, 2013, at 8:02 PM, Cameron McInally <cameron.mcinally at nyu.edu> wrote: > I'm less concerned about "where" the trap happens as I am about "if" it happens. For example, a Fortran program with division-by-zero is, by the Standard, non-conforming. Pragmatically, not a Fortran program. Rather than wrong answers, I would like to see a hard error indicating
2013 Apr 06
3
[LLVMdev] Integer divide by zero
I'm also not fully happy with LLVM's behavior here. There is another undefined case too, which is the minimum integer divided by -1. In Julia I can get "random" answers by doing: julia> sdiv_int(-9223372036854775808, -1) 87106304 julia> sdiv_int(-9223372036854775808, -1) 87108096 In other contexts where the arguments are not constant, this typically gives an FPE trap. More than insisting on a particular behavior, I'd like it to be consistent. I know the result is undefined, so LLV...
2013 Apr 06
4
[LLVMdev] Integer divide by zero
On Fri, Apr 5, 2013 at 6:49 PM, Joe Groff <arcata at gmail.com> wrote: ... The platform is irrelevant; division by zero is undefined, and compilers > are allowed to optimize as if it can't happen. > Understood. I don't mean to nag, but I'm not arguing which is [more] correct: the Standards or the platform. Both have their own merits. At least to me they both have merits.