MainComputersProgrammingLanguages › DownGradePrecision

DownGradePrecision

Edit Page
Report
Scan day: 16 February 2014 UTC
101
Virus safety - good
Description: Code by Kevin Rhoads to allow precision to be deliberately thrown away in an IEEE floating point compliant computing environment in order to more closely model computations in less precise floating point systems.
!Note: This file was reformatted from a COMP.LANG.FORTRAN message. ! comments ! were added and may need to be removed in favor or "*" or "C", ! for your specific compiler and source form selected. ! !OK -- This mess compiles with MS Fortran 5.1, MS FPS1 and FPS4, Digital's !DVF5 and Compaq's CVF 6.1 !I haven't had a chance to test it, but it is simple enough that it should !just work. !IIRC - the GNU LGPL allows one to use code by only supplying the source !for the LGPL'd code, not your own. If neither that, nor any of the other !licenses listed below suits, I can be flexible. The main reason I am not !just putting this into the public domain is that then I'd have no !protection if someone wants to sue me over some misuse of this. !HTH !Kevin !*----------------------------------------------------------------------- !* !* These two routines are designed to allow precision to be deliberately !* thrown away in an IEEE floating point compliant computing environment !* (such as Intel x87 or Apple SANE) in order to more closely model !* computations in less precise floating point systems. !* !*----------------------------------------------------------------------- !* !* Copyright 2001 Kevin G. Rhoads !* !* Use is licensed under many of the so-called "public" licenses, per !* choice of user: GNU GPL, GNU LGPL, Artistic License, or the Q License !* !*----------------------------------------------------------------------- !* !* It is the responsibility of the user of this code to ensure that the !* initialization routine is called FIRST! => call moyel_init() !* before using moyel. !* !*----------------------------------------------------------------------- !* !* The function moyel is designed to "trim" precision from IEEE 32 bit !reals. ! !* If you need to trim doubles or extended reals, convert to single and !* use moyel or write your own. !* !* trimmed_real = moyel( untrimmed_real, how_much_to_trim ) !* where how_much_to_trim is an integer !* valid
Size: 2048 chars

Contact Information

Email:
Phone&Fax:
Address:
Extended:

WEBSITE Info

Page title:
Keywords:
Description:
IP-address:72.167.183.32

WHOIS Info

NS
Name Server: NS3.SECURESERVER.NET
Name Server: NS4.SECURESERVER.NET
WHOIS
Status: clientTransferProhibited
Date
Creation Date: 10-may-1998
Expiration Date: 09-may-2014