Re: [Haskell-cafe] pi

2007-10-11 Thread jerzy . karczmarczuk
My last word (promise!) on the subject, especially addressed to Jonathan Cast, who writes: To wit, I'm still failing to understand what your position is. I quote the Master: Lennart: Come on people! This discussion is absurd. The numeric classes in Haskell have a lot of choices that

Re: [Haskell-cafe] pi

2007-10-11 Thread Jonathan Cast
On Thu, 2007-10-11 at 11:22 +0200, [EMAIL PROTECTED] wrote: My last word (promise!) on the subject, especially addressed to Jonathan Cast, who writes: To wit, I'm still failing to understand what your position is. I quote the Master: Lennart: Come on people! This discussion is

Re: [Haskell-cafe] pi

2007-10-10 Thread Yitzchak Gale
Dan Piponi wrote: The reusability of Num varies inversely with how many assumptions you make about it. A default implementation of pi would only increase usability, not decrease it. If you need a specialized definition of pi in your instance, you would provide it, just as you do now. If pi

Re: [Haskell-cafe] pi

2007-10-10 Thread jerzy . karczmarczuk
Yitzchak Gale writes: Dan Piponi wrote: The reusability of Num varies inversely with how many assumptions you make about it. A default implementation of pi would only increase usability, not decrease it. Suppose I believe you. (Actually, I am afraid, I have doubts.) Can you provide some

Re: [Haskell-cafe] pi

2007-10-10 Thread Henning Thielemann
On Wed, 10 Oct 2007, Yitzchak Gale wrote: Dan Piponi wrote: The reusability of Num varies inversely with how many assumptions you make about it. A default implementation of pi would only increase usability, not decrease it. As the others have shown, you can compute PI in many ways. Which

Re: [Haskell-cafe] pi

2007-10-10 Thread jerzy . karczmarczuk
Jules Bean writes: jerzy.karczmarczuk: Somehow I do not only think that the default implementation would be good for nothing, but that putting PI into Floating as a class member, serves nobody. Are you aware that it already is in the Floating class? A very interesting question. What do you

Re: [Haskell-cafe] pi

2007-10-10 Thread Jules Bean
[EMAIL PROTECTED] wrote: Somehow I do not only think that the default implementation would be good for nothing, but that putting PI into Floating as a class member, serves nobody. Are you aware that it already is in the Floating class? This discussion is not about adding it, but about whether

Re: [Haskell-cafe] pi

2007-10-10 Thread Jules Bean
[EMAIL PROTECTED] wrote: This discussion is not about adding it, but about whether or not it should have a default. Are you suggesting pi should be removed from the Floating class? Then, what type would you give pi? First, I don't care whether it is there or not. When I use it, I define a

Re: [Haskell-cafe] pi

2007-10-10 Thread Dan Piponi
Jules Bean said: If it is true of many Floating instances that (atan 1 * 4) is an accurate way to calculate pi (and it appears to be 'accurate enough' for Float and Double, on my computer) then adding it as a default doesn't appear to do any harm. Maybe this is the wrong point of view, but I

Re: [Haskell-cafe] pi

2007-10-10 Thread David Roundy
On Wed, Oct 10, 2007 at 08:49:56AM -0700, Dan Piponi wrote: Jules Bean said: If it is true of many Floating instances that (atan 1 * 4) is an accurate way to calculate pi (and it appears to be 'accurate enough' for Float and Double, on my computer) then adding it as a default doesn't

Re: [Haskell-cafe] pi

2007-10-10 Thread ok
On 11 Oct 2007, at 4:49 am, Dan Piponi wrote: Maybe this is the wrong point of view, but I think of defaults as impementations that are meant to be correct, but not necessarily the best way of doing things, leaving you the option to provide something better. The example of tanh in the report

Re: [Haskell-cafe] pi

2007-10-10 Thread Jonathan Cast
On Wed, 2007-10-10 at 10:40 +0200, [EMAIL PROTECTED] wrote: Yitzchak Gale writes: Dan Piponi wrote: The reusability of Num varies inversely with how many assumptions you make about it. A default implementation of pi would only increase usability, not decrease it. Suppose I

Re: [Haskell-cafe] pi

2007-10-10 Thread jerzy . karczmarczuk
Jonathan Cast adds 'something' to a discussion about pi. I commented the statement of Yitzchak Gale, who answered some point of Dan Piponi: A default implementation of pi would only increase usability, not decrease it. I said: Can you provide some examples of this increased usability?

Re: [Haskell-cafe] pi

2007-10-10 Thread Jonathan Cast
On Thu, 2007-10-11 at 02:11 +0200, [EMAIL PROTECTED] wrote: Jonathan Cast adds 'something' to a discussion about pi. I commented the statement of Yitzchak Gale, who answered some point of Dan Piponi: A default implementation of pi would only increase usability, not decrease it. I

Re: [Haskell-cafe] pi

2007-10-09 Thread Don Stewart
jonathanccast: I just noticed that pi doesn't have a default definition in the standard prelude, according to the Haddock docs. Why is this? $ ghci Prelude :t pi pi :: (Floating a) = a Prelude pi 3.141592653589793 It's in the Floating class. -- Don

Re: [Haskell-cafe] pi

2007-10-09 Thread jerzy . karczmarczuk
Jonathan Cast reacts to Don Stewart statement about PI: It's in the Floating class. Yes. But it doesn't have a default implementation. That strikes me as odd, considering the mathematical and actual correctness of class Floating sigma where pi = acos (-1) ... So, you assume that

Re: [Haskell-cafe] pi

2007-10-09 Thread Dan Piponi
On 10/9/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: So, you assume that acos should have a *default* implementation in the Floating class? Propose it, please. I don't think the proposal makes any such assumption. It implies only that *if* you provide acos, pi will be provided for you

Re: [Haskell-cafe] pi

2007-10-09 Thread jerzy . karczmarczuk
Dan Piponi writes: jerzy.karczmarczuk wrote: So, you assume that acos should have a *default* implementation in the Floating class? Propose it, please. I don't think the proposal makes any such assumption. It implies only that *if* you provide acos, pi will be provided for you automatically

Re: [Haskell-cafe] pi

2007-10-09 Thread Dan Piponi
On 10/9/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Yes, sorry, I slipped... I was so against the acos(-1) /or atan(...)/ solution, that I wrote anything... +1, Honest -- Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org