Re: [GHC] #5683: bug in signum function

2012-06-11 Thread GHC
#5683: bug in signum function
-+--
Reporter:  tristes_tigres|   Owner:  
Type:  bug   |  Status:  new 
Priority:  normal|   Milestone:  7.6.1   
   Component:  Prelude   | Version:  7.0.3   
Keywords:|  Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  | Failure:  Other   
  Difficulty:  Unknown   |Testcase:  
   Blockedby:|Blocking:  
 Related:|  
-+--
Changes (by mihai.maruseac):

 * cc: mihai.maruseac@… (added)


-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5683#comment:6
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #5683: bug in signum function

2012-06-11 Thread GHC
#5683: bug in signum function
-+--
Reporter:  tristes_tigres|   Owner:  
Type:  bug   |  Status:  new 
Priority:  normal|   Milestone:  7.6.1   
   Component:  Prelude   | Version:  7.0.3   
Keywords:|  Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  | Failure:  Other   
  Difficulty:  Unknown   |Testcase:  
   Blockedby:|Blocking:  
 Related:|  
-+--

Comment(by simonmar):

 Isn't this the same as #3070?

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5683#comment:7
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #5683: bug in signum function

2012-06-11 Thread GHC
#5683: bug in signum function
-+--
Reporter:  tristes_tigres|   Owner:  
Type:  bug   |  Status:  new 
Priority:  normal|   Milestone:  7.6.1   
   Component:  Prelude   | Version:  7.0.3   
Keywords:|  Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  | Failure:  Other   
  Difficulty:  Unknown   |Testcase:  
   Blockedby:|Blocking:  
 Related:|  
-+--

Comment(by mihai.maruseac):

 It is.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5683#comment:8
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #5683: bug in signum function

2012-06-11 Thread GHC
#5683: bug in signum function
---+
  Reporter:  tristes_tigres|  Owner:  
  Type:  bug   | Status:  closed  
  Priority:  normal|  Milestone:  7.6.1   
 Component:  Prelude   |Version:  7.0.3   
Resolution:  duplicate |   Keywords:  
Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
   Failure:  Other | Difficulty:  Unknown 
  Testcase:|  Blockedby:  
  Blocking:|Related:  
---+
Changes (by simonmar):

  * status:  new = closed
  * resolution:  = duplicate


-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5683#comment:9
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #5683: bug in signum function

2012-03-09 Thread GHC
#5683: bug in signum function
-+--
Reporter:  tristes_tigres|   Owner:  
Type:  bug   |  Status:  new 
Priority:  normal|   Milestone:  7.6.1   
   Component:  Prelude   | Version:  7.0.3   
Keywords:|  Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  | Failure:  Other   
  Difficulty:  Unknown   |Testcase:  
   Blockedby:|Blocking:  
 Related:|  
-+--
Changes (by lelf):

 * cc: anton.nik@… (added)


-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5683#comment:5
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #5683: bug in signum function

2011-12-25 Thread GHC
#5683: bug in signum function
-+--
Reporter:  tristes_tigres|   Owner:  
Type:  bug   |  Status:  new 
Priority:  normal|   Milestone:  7.6.1   
   Component:  Prelude   | Version:  7.0.3   
Keywords:|  Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  | Failure:  Other   
  Difficulty:  Unknown   |Testcase:  
   Blockedby:|Blocking:  
 Related:|  
-+--

Comment(by tristes_tigres):

 I don't quite understand what you're saying.

  (e.g. should 7.7 be converted to 7 or 8?).

 That is determined by the function you're using: round, floor or ceil. In
 the context of arithmetic operations, which way you round, say, 7.5, is
 determined by IEEE rounding-mode flags.


  I think we do need truncate et al to be able to return integral types,
 though:

 I see two problems with that:
 a) Handling of special types: Inf, NaN. They are valid floating-point
 types, raisig exception on rounding them disagrees with what standard says
 (and the current way they're handled by Prelude is even worse)
 b) Making output of round into integral will require conversion back to
 floating-point in some typical floating-point computations. For instance,
 take computing of a sine. As a first step, argument is reduced to the
 interval [0, pi/4] (and then rational approximation is used). Reduction
 involves rounding the floating-point result of the division by pi. There's
 abslutely no reason to convert it to integral.

 (I speak from floating-point standard perspective)

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5683#comment:4
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #5683: bug in signum function

2011-12-11 Thread GHC
#5683: bug in signum function
--+-
 Reporter:  tristes_tigres|  Owner:  
 Type:  bug   | Status:  new 
 Priority:  normal|  Component:  Prelude 
  Version:  7.0.3 |   Keywords:  
   Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
  Failure:  Other |   Testcase:  
Blockedby:|   Blocking:  
  Related:|  
--+-

Comment(by tristes_tigres):

 Thoughts about the right (meaning, in the spirit of IEEE754) way to fix
 this:

 Operations truncate, round, ceiling and floor on a floating-point type
 should return floating-point type, not integral. The operation of rounding
 need not and should not be combined with type conversion.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5683#comment:2
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


[GHC] #5683: bug in signum function

2011-12-05 Thread GHC
#5683: bug in signum function
-+--
Reporter:  tristes_tigres|   Owner: 
Type:  bug   |  Status:  new
Priority:  normal|   Component:  Prelude
 Version:  7.0.3 |Keywords: 
Testcase:|   Blockedby: 
  Os:  Unknown/Multiple  |Blocking: 
Architecture:  Unknown/Multiple  | Failure:  Other  
-+--
 IEE754 standard states, that every floating point operation involving a
 NaN should produce NaN. However, in GHC 7.0.3 (in the current Haskell
 platform) evaluating[[BR]]
  signum (0.0/0.0)[[BR]]
 produces -1

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5683
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #5683: bug in signum function

2011-12-05 Thread GHC
#5683: bug in signum function
-+--
Reporter:  tristes_tigres|   Owner: 
Type:  bug   |  Status:  new
Priority:  normal|   Component:  Prelude
 Version:  7.0.3 |Keywords: 
Testcase:|   Blockedby: 
  Os:  Unknown/Multiple  |Blocking: 
Architecture:  Unknown/Multiple  | Failure:  Other  
-+--

Comment(by tristes_tigres):

 And[[BR]]
 round (0.0/0.0)[[BR]]
 produces a very large negative number.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5683#comment:1
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs