Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site mit-bug.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!mit-bug!dove From: dove@mit-bug.UUCP (Web Dove) Newsgroups: net.lang.c Subject: Can C default to float? Are there float regs? Message-ID: <175@mit-bug.UUCP> Date: Thu, 12-Sep-85 09:54:54 EDT Article-I.D.: mit-bug.175 Posted: Thu Sep 12 09:54:54 1985 Date-Received: Sat, 14-Sep-85 07:29:40 EDT References: <418@phri.UUCP> <700002@fthood> <187@graffiti.UUCP> Reply-To: dove@mit-bugs-bunny.UUCP (Web dove) Organization: MIT Digital Signal Processing Group Lines: 18 Many people in our group find it frustrating that C converts floating arithmetic to double. Converting float variables to double, doing the calculation and converting back to float is usually so costly that it is faster to do it in double. Unfortunately, this wastes space. Also, our machines (vax 750/4.2bsd) would be faster if the computations were done in straight float. Many people resort to fortran/assembler to accomplish this, but it is unfortunate to need to use two languages. I realize that this violates the standard for C, but has anyone ever changed the compiler to accomplish this? On a related note, it appears that register declarations for float variables have no effect on our compiler (they don't cause the variables to be stored in registers). It has been hypothesized that those who write the compiler don't feel that making "register float" do something is worth the effort. Is there anyone who has made "register float" work? Is it impossible?