Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Jan Burse Newsgroups: comp.lang.java.programmer Subject: Re: higher precision doubles Date: Sun, 11 Sep 2011 13:29:58 +0200 Organization: albasani.net Lines: 40 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news.albasani.net ITPvGQAlQR21uXD4pkA1r/aagRbVipcooooWzQ0XvPR8MEr1yFcJkMqARlfggOyZVtszv6wW8riesAblHtBECQ== NNTP-Posting-Date: Sun, 11 Sep 2011 11:29:59 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="BKTajaib6SR/B247y3afAMRF/LZoY00O845wHKhE7J0sX+ldRibE/1PX0tC2YIJNqFF122u0ibOs+MXyAHiUyH5CPbbZ1htzA5Cd0v+Is04x4AnXkR/4bAvKT+zpVh5z"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20110902 Firefox/6.0.2 SeaMonkey/2.3.3 In-Reply-To: Cancel-Lock: sha1:gfdjWBBg+JskwvphidgZRmCsu94= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7789 Lew schrieb: > Since Mathematica runs on *floating point hardware*, create by humans, This is not quite true what your are saying here. Mathematica has actually 3 modes in dealing with sin. The modes are as follows: - Symbolic - Machine Precision - High Precision What the poster showed, sin[2 Pi] = 0, was an implicit FunctionExpand of sin, so a symbolic manoeuvre. If he would force mathematica to use machine precision or high precision he would get another result. Here is an example: N[pi,18] = 3.14159265358979324. N[sin[3.14159265358979324],18] = -1.53735661672049712×10^-18 Whether the machine precision uses the floating point hardware is unspecified. Most likely, but it could also use some software emulation. So as to prevent differences from platform to platform, like the strictfp modifier. Would need to further dig into the Mathematica documentation for this question. For more details and many example uses of the modes see for example here: http://reference.wolfram.com/mathematica/ref/Sin.html For a first intro into the modes see the "Scope" section. Bye