Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn ) Newsgroups: net.lang.c Subject: Re: How to test for +/- INFINITY, etc. in C with IEEE Message-ID: <712@brl-tgr.ARPA> Date: Sun, 15-Dec-85 19:47:08 EST Article-I.D.: brl-tgr.712 Posted: Sun Dec 15 19:47:08 1985 Date-Received: Tue, 17-Dec-85 07:25:44 EST References: <993@turtlevax.UUCP> <8040@ucla-cs.ARPA> Organization: Ballistic Research Lab Lines: 11 > short pi[4] = {0x4008,0x1234,etc,etc}; > double x, y; > x = y * *(double *)pi Beware! The alignment applied to (short) data may not be sufficiently stringent for (double) data, so the result of the (double *) typecast (assuming the compiler allows it) may not be suitable for the address of an operand for a floating-point instruction. We have machines like that.. You can overcome this problem by proper use of a union.