Re: Hugs Humor
On 2003-07-05 at 19:43+0200 Steffen Mazanek wrote: Hello, a quit funny hugs session: Prelude 0.5::Rational 1 % 2 Prelude 0.1::Rational 13421773 % 134217728 Prelude 13421773/134217728 0.1 I do not know how this fraction is calculated, but it does not fit my expectations :-) Remember that internally arithmetic is binary, and that 0.1 can't be expressed exactly as a floating point number. I think that's the explanation. Ok, ok, it is no bug... No, I think it is a bug: 0.1 ought to be equivalent to fromRational (1%10), but Hugs isn't intended for numerical work. GHCi gets the right answer. Jón -- Jón Fairbairn [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: Hugs Humor
On Sat, Jul 05, 2003 at 08:24:32PM +0100, Jon Fairbairn wrote: On 2003-07-05 at 19:43+0200 Steffen Mazanek wrote: a quit funny hugs session: Prelude 0.5::Rational 1 % 2 Prelude 0.1::Rational 13421773 % 134217728 Prelude 13421773/134217728 0.1 I do not know how this fraction is calculated, but it does not fit my expectations :-) Remember that internally arithmetic is binary, and that 0.1 can't be expressed exactly as a floating point number. I think that's the explanation. Ok, ok, it is no bug... No, I think it is a bug: 0.1 ought to be equivalent to fromRational (1%10), but Hugs isn't intended for numerical work. GHCi gets the right answer. Yes, Hugs represents floating point literals in binary, and it's not intended for the numeric work. But the CVS version already contains a hack that usually converts these literals back to the right Rational: Prelude 0.1::Rational 1 % 10 Prelude 0.0123456789::Rational 123456789 % 100 Prelude 2.2e-9::Rational 11 % 50 The real fix would be to keep the literals as Rationals, but this would be too expensive in the Hugs setting. ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
ucuz arama
Title: Nette Alo BU E-POSTAYI GRNTLEYEMYORSANIZ LTFEN TIKLAYINIZ!NETTE ALO netPCphone nternet aramalar iin USB telefon Uzun mesafe aramalara ok fazla para m dyorsunuz? te, dnyann drt bir yanndaki aileniz ve dostlarnzla konutuunuz zaman size GEREK TASARRUFU sunan bir telefon netPCphone, kiisel bilgisayarnzn USB portuna balanan a tesi bir telefondur. Dier telefonlara IP zerinden toll kalitesinde aramalar yapmanza olanak vermesinin yannda, kiisel bilgisayarnz tam bir iletiim cihazna dntrmektedir. Geni servis salayclar seme olana netPCphone, kendisini bir windows ses cihaz olarak yaplandrd iin her eit internet telefon servisi salaycs (ITSP) ile uyumludur. ? En sevdiiniz Hazr Haberciniz ile kullann En sevdiiniz sesli hazr haberciniz iin mkemmel arkadatr. netPCphone, AOL, MSN, ICQ, Yahoo! gibi popler hazr mesaj servisleri araclyla PC'den PC'ye (cretsiz) ve PC' den Telefona (ekonomik) aramalar yapmanza olanak verir. rtibat Tel: (0216) 414 36 22 dahili: 191 e-posta: [EMAIL PROTECTED] www.nettealo.com (Detayl Bilgi ve On-line Sat) Bu bir bilgilendirme mesaj olup, spam deildir. irketimiz tarafndan tantm amal yollanmtr.Bu tr mesajlar almak istemiyorsanz ltfen buraya tklaynz . ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe