series

2001-08-14 Thread Luis Pablo Michelena
hello, i just want to ask a simple question: does somebody have or know where to find a haskell program that calculates the number e, that is the list of infinite digits? Because i think it may be possible to do it, but i haven´t find the way to do it. what i am looking for is something like 

Re: series

2001-08-15 Thread Bernd Holzmüller
You might want to use e n = sum [1 % fak x | x <- [0..n]] and convert it to floating point representation via fromRational (e l) Bernd Holzmüller Luis Pablo Michelena schrieb: > > hello, i just want to ask a simple question: does somebody have or > know where to find a haskell program that c

series. Reply

2001-08-15 Thread S.D.Mechveliani
Luis Pablo Michelena <[EMAIL PROTECTED]> writes on the subject `series' > where to find a haskell program that calculates the number e, that is > the list of infinite digits? > [..] > what i am looking for is something like the ertostenes sifts, that > prints every

Re: series

2001-08-15 Thread John Hughes
ohn Hughes - Here's a way to compute all the digits of e. We use the series e = 2 + 1 + 1 + 1 + ... ------ 2!3!4! which we can think of as representing e as 2.1... in a

Re: series

2001-08-15 Thread John Hughes
a way to compute all the digits of e. We use the series e = 2 + 1 + 1 + 1 + ... ------ 2!3!4! which we can think of as representing e as 2.1... in a strange number system with a varying base. In this number system, the fraction

Re: series

2001-08-15 Thread Jon Fairbairn
> > hello, i just want to ask a simple question: does > > somebody have or knowwhere to find a haskell program that > > calculates the number e, that is the list of infinite > > digits? > It's a nice problem, which I encountered many years > ago as one of the first examples I saw of lazy e

Re: series

2001-08-15 Thread Dylan Thurston
On Wed, Aug 15, 2001 at 02:15:31AM -0300, Luis Pablo Michelena wrote: > hello, i just want to ask a simple question: does somebody have or > know where to find a haskell program that calculates the number e, > that is the list of infinite digits? Because i think it may be > possible to do it, but

Re: series

2001-08-16 Thread Alastair David Reid
> hello, i just want to ask a simple question: does somebody have or > know where to find a haskell program that calculates the number e, > that is the list of infinite digits? Hugs includes such a function in its demos. Look at eFactBase in the file hugs98/demos/Examples.hs There's a lot of oth

[Haskell] Power series in a nutshell

2007-07-12 Thread Doug McIlroy
For lovers of things small and beautiful, http://www.cs.dartmouth.edu/~doug/powser.html boils down basic operations on power series with numeric coefficients to the bare minimum--each is a one-liner. Included are overloaded arithmetic operators, integration, differentiation, functional composition

Re: [Haskell] Power series in a nutshell

2007-07-12 Thread Taral
On 7/12/07, Doug McIlroy <[EMAIL PROTECTED]> wrote: http://www.cs.dartmouth.edu/~doug/powser.html Very nice. I would only recommend that you include: scale k f = map (k*) f and have (*) use it. Thanks for your contribution! -- Taral <[EMAIL PROTECTED]> "Please let me know if there's any furt

Re: [Haskell] Power series in a nutshell

2007-07-12 Thread Derek Elkins
On Thu, 2007-07-12 at 12:49 -0400, Doug McIlroy wrote: > For lovers of things small and beautiful, > http://www.cs.dartmouth.edu/~doug/powser.html > boils down basic operations on power series with numeric > coefficients to the bare minimum--each is a one-liner. > Included

Re: [Haskell] Power series in a nutshell

2007-07-12 Thread jerzy . karczmarczuk
Derek Elkins writes: Doug McIlroy wrote: For lovers of things small and beautiful, http://www.cs.dartmouth.edu/~doug/powser.html ... and a link to your earlier Functional Pearl, http://citeseer.ist.psu.edu/mcilroy98power.html If somebody is interested in similar manipulations, sometimes a b

Re: [Haskell] Power series in a nutshell

2007-07-16 Thread Ryan Ingram
This is really interesting. I love how the typechecker can resolve 1:0:1 (representing (1+x^2)) 1 : 0 : 1 => 1 : 0 : (fromInteger 1 :: [Integer]) => 1 : 0 : (series (fromInteger 1 :: Integer)) => 1 : 0 : (series 1) => 1 : 0 : 1 : repeat 0 (I'm going to go on a bit of a soapbox

Re: [Haskell] Power series in a nutshell

2007-07-17 Thread Bas van Dijk
On 7/17/07, Ryan Ingram <[EMAIL PROTECTED]> wrote: Automatic conversion to numeric types via fromInteger could be extended to other types; fromList and fromString could be applied automatically to convert other literals: class LiteralString a where fromString :: String -> a class LiteralList a b

Re: [Haskell] Power series in a nutshell

2007-07-17 Thread Wolfgang Jeltsch
Am Dienstag, 17. Juli 2007 11:47 schrieb Bas van Dijk: > […] > GHC HEAD has support for overloaded String literals. See: > > http://haskell.org/ghc/dist/current/docs/users_guide/other-type-extensions. > html#overloaded-strings These are really good news! However, the identifier IsString is probl

[Haskell] take 10 [1..] article series: Libraries ( please contribute ! )

2005-11-22 Thread Kenneth Hoste
As was already announced, I'll try to provide an article for each upcoming TMR [1] issue, regarding some subject in the world of Haskell. My intention is to write a short piece on some item which fits the monthly subject. The first topic for the series of 'take 10 [1..]' articl

[Haskell] Announcement: The Chalmers Online Functional Programming Seminar Series (TODAY: Benjamin Pierce!)

2020-05-18 Thread Koen Claessen
The *Chalmers Online Functional Programming Seminar Series <http://chalmersfp.org/>* is organized by the Chalmers Functional Programming Group, as a way to exploit the fact that so many of us in the FP community are already meeting and working online these days. Our aim is to bring the peo

[Haskell] Reminder: The Chalmers Online Functional Programming Seminar Series (THIS WEEK: Nadia Polikarpova)

2020-05-24 Thread Koen Claessen
The *Chalmers Online Functional Programming Seminar Series <http://chalmersfp.org/>* is organized by the Chalmers Functional Programming Group, as a way to exploit the fact that so many of us in the FP community are already meeting and working online these days. Our aim is to bring the peo