<div>Hello,</div>
<div> </div>
<div>some details regarding my question. I got this assignment which gives me the following: SomeFunction :: Integer -> String. Which uses the show function to convert the Integer to String.</div>
<div> </div>
<div>However it asks me how my function can fail? Well I know my function fails by definition when I do not insert an Integer into SomeFunction. Like SomeFunction 2.3425221 and now I also know that when I insert a number that is very close to zero (I think a denormalized value means that a value is very close to zero: <a href="http://www.haskell.org/pipermail/libraries/2004-November/002661.html">http://www.haskell.org/pipermail/libraries/2004-November/002661.html</a>) I get probably get an error. But that is normal as a 0.000001 * e^(-10) is not really an Integer, right?</div>
<div> </div>
<div>Now I also know that when I use 'undefined' I would get an error. So what other cases are there? (I asked my question about Floating because I guessed it would be similiar to Integers)</div>
<div> </div>
<div>At this moment I really can't figure out how my function can fail other than the inputs described above.</div>
<div> </div>
<div>Thanks for your help!<br><br></div>
<div class="gmail_quote">2009/11/27 Tsunkiet Man <span dir="ltr"><<a href="mailto:temp.tsun@gmail.com">temp.tsun@gmail.com</a>></span><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>Hello,</div>
<div> </div>
<div>yes that is exactly what I mean, however I mean what kind of value do I need to input in 'a' that gets me an error back? That is is from the Floating class? (Other than undefined)</div>
<div> </div>
<div>Could you please explain to me what IEEE 754 is and what exactly is a denormalized value? (After responding, I will google it also though).</div>
<div> </div>
<div>Thank you for your help,</div>
<div> </div>
<div>J.T.K.M.<br><br></div>
<div class="gmail_quote">2009/11/27 Roel van Dijk <span dir="ltr"><<a href="mailto:vandijk.roel@gmail.com" target="_blank">vandijk.roel@gmail.com</a>></span>
<div>
<div></div>
<div class="h5"><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">>ShowFloat -> Floating -> String<br>I do not really understand this type.<br><br>Did you mean something like this:<br>
<br>showFloat :: (Show a, Floating a) => a -> String<br>showFloat = show<br><br>In that case it depends on what type you fill in for 'a' and more<br>specifically that type's Show instance. One value for which most (or<br>
all) show functions will give an error is ⊥ (undefined). If the type<br>you pick is some kind of IEEE 754 type then you might have some<br>trouble with denormalized values. But that is just a guess, you would<br>have to test for that.<br>
<br>If that is not what you mean than I would appreciate some clarification.<br><br>Regards,<br><font color="#888888">Roel<br></font></blockquote></div></div></div><br></blockquote></div><br>