Re: [BLACKBOX] Math.Pi (was: CONSTant expressions)

From: Campbell, Robert D (SELEX) (UK Edinburgh) <"Campbell,>
Date: Mon, 21 Jan 2008 09:19:42 -0000

----boundary-LibPST-iamunique-1753555370_-_-
Content-type: text/plain

Hi Chris

I'm replying personally as I suspect I have sounded off
more than enough in public.

You are right, what I say is 'theory' & supposition. None
of it is actual knowledge.

I did not say the Math.Pi behaviour was intentional. I have no idea.

I wrote my own Pi procedure:

PROCEDURE Pi (x : REAL) : REAL;
  BEGIN
    RETURN Math.Pi (x)
  END Pi;

It behaved like Math.Pi. (ie pi # Pi)


 I rewrote it as
  RETURN 22. / 7.

and now pi does = Pi.

Another hole in my 'theory'.


I first noticed pi # Pi about 10 years ago! I vaguely remember
investigating
this at the time and discovering that Pi was more accurate than pi. But
my memory could be playing me tricks.


Cheers

Robert

ps - I decided to go public on this anyway!


>> -----Original Message-----
>> From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
>> Of CFB Software
>> Sent: 20 January 2008 23:41
>> To: BLACKBOX{([at]})nowhere.xy
>> Subject: Re: [BLACKBOX] Math.Pi (was: CONSTant expressions)
>>
>> *** WARNING ***
>>
>> This mail has originated outside your organization, either
>> from an external partner or the Global Internet.
>> Keep this in mind if you answer this message.
>>
>> >From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
>> >Sent: Sunday, 20 January 2008 11:16 PM

>> >To: BLACKBOX{([at]})nowhere.xy
>> >Subject: Re: [BLACKBOX] CONSTant expressions
>> >
>> >> CFB Software wrote:

>> >> OutBool ('pi = Pi ? ', pi = Math.Pi ()); (*

>> FALSE *)
>> >>
>> >> I would have expected the third result to be TRUE - have I fallen
>> >> into a carefully-laid trap?
>> >
>> > The call Math.Pi () leaves an 80-bit result in the floating point
>> >register, that is then compared with a 64-bit rounded
>> version. Result?
>> >they are different!
>>
>> I'm not convinced that the behaviour is intentional. Math.Pi
>> is documented as *returning* a REAL. i.e. 64 bits.
>>
>> Additionally, how does your theory explain this one?
>>
>> OutBool ('Pi = Pi ? ', Math.Pi() = Math.Pi()
>> ); (* FALSE *)
>>
>> Regards,
>> Chris
>>
>> Chris Burrows
>> CFB Software
>> http://www.cfbsoftware.com/cp
>>
>>
>> ----
>> To unsubscribe, send a message with body "SIGNOFF BLACKBOX"
>> to LISTSERV{([at]})nowhere.xy
>>
>>

SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1753555370_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIEhpIENocmlzXHBhcg0KXHBhcg0KSSdtIHJlcGx5
aW5nIHBlcnNvbmFsbHkgYXMgSSBzdXNwZWN0IEkgaGF2ZSBzb3VuZGVkIG9mZlxwYXINCm1vcmUg
dGhhbiBlbm91Z2ggaW4gcHVibGljLlxwYXINClxwYXINCllvdSBhcmUgcmlnaHQsIHdoYXQgSSBz
YXkgaXMgJ3RoZW9yeScgJi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lciBwZXJzb24uXHBhcg0KKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipccGFyDQpccGFyDQpccGFyDQotLS0tXHBh
cg0KVG8gdW5zdWJzY3JpYmUsIHNlbmQgYSBtZXNzYWdlIHdpdGggYm9keSAiU0lHTk9GRiBCTEFD
S0JPWCIgdG8gTElTVFNFUlZATElTVFN9fQBtYm1sc1hHWmphR0Z5Cg=
----boundary-LibPST-iamunique-1753555370_-_---
Received on Mon Jan 21 2008 - 10:19:42 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:31:09 UTC