From: pharrington Date: 2009-12-24T11:10:23+09:00 Subject: Re: Trig value errors On Dec 23, 8:04 pm, Seebs wrote: > On 2009-12-24, jzakiya wrote: > > >seebs wrote: > >> Here's the problem:  There exists at least one value for which the correct > >> value of cos(x) is about 9e-11, which can be correctly represented (within) > > And what (extremely small) angle(s) would that be? > > Are you really this stupid? > > > if (abs(cos_value) < 1e-14) cos_value = 0.0; > > This provides the correct answers for the errors I illustrated. > > Again: > > If you can measure, in a float, the amount of the error, then there exists > a value for which that number is closer than 0, and you're introducing > an error larger than you're correcting. > > > This makes me happy. :-) > > Have you considered masturbating in public?  It would also make you happy, > and be easier for other people to ignore. > > Again: > > If you want rounded values, round them yourself.  You've just demonstrated > that you know how to round (albeit poorly).  Great.  When you want rounded > values, you go ahead and round them, then. > > -s > -- > Copyright 2009, all wrongs reversed.  Peter Seebach / usenet-nos...@seebs.nethttp://www.seebs.net/log/<-- lawsuits, religion, and funny pictureshttp://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated! Let him break his Ruby install if he wants. Best to learn through experience.