nfoWare Hard Hat Stage

toolNote t060301
 Computer Arithmetic Gotchas
Diary & Job Jar

nfoWare>toolcraft>
2006>03>

t060301a>
0.01 2017-06-03 15:07 -0700

Status

Date

Description

     
     
     
     
  2007-08-13 t060301c: version progression should include the downloads and then the text should talk about what is revealed.
  2007-08-13 t060301c.zip review this and the manifest for the latest and most-useful approach.
  2007-08-13 t060301: This ties very much into specified vs. intended/expected behavior, and what it does for people who are, these days, barely able to count out change and are not taught anything around being able to check our work.
  2007-08-13 t060301: We need an explanation about how untrustworthy computer arithmetic is (although it is exquisitely reliable at it), as a motivator, especially around how everything is designed for us to overlook that situation if we have any awareness of it at all.
  2007-08-13 We need a general note to place at the t060301b level and then links to examples and illustrations
  2007-08-13 We need a better organization and provision for gotchas beside floating point.  There are integer arithmetic gotchas too.
  2006-03-25 float5.c: Provide a reference to the pre-defined preprocessor variables that arise with VC++ and that are relied on in this code.
  2006-03-25 Check for popular treatments: Wikipedia, elsewhere.
  2006-03-25 This situation around the use of computers and the verification of dependable operation also extends to trustworthiness.  It would be all right to use the TROST discussion list and SourceForge project as a place to contribute about this.
  2006-03-25 T060301c.htm: Provide links to where there is more information on the Toolkit and Express Edition compilers as sources and also as discussed and supported under nfoWare toolcraft.
  2006-03-25 T060301c.txt: Provide links to where the Express Edition and the Toolkit compilers are available.
  2006-03-25 T060301c3.htm: Include an HTML form of the formatted listing.
  2006-03-25 float5.c: Include a reference to the #pragma and #error preprocessor directives in Microsoft C/C++ also.
  2006-03-25 T060301c: Include a reference to the #pragma and related information in MSDN on-line.
  2006-03-25 T060301c: Include the Fleegal reference and the Plauger reference
  2006-03-25 T060301c.txt Specify whether there are particular prerequisites, or do the required tools handle it?
  2006-03-25 T060301c.txt Specify the limitations on this program.
  2006-03-25 float5.c: Make showhex() static.
  2006-03-25 float5.c: The #error on processor model should perhaps say "80x86" instead of "Ix86" to be more understandable.
  2006-03-25 The complaint is not that these situations exist, but that they exist in programming systems that are intended for casual use, education, and application by non-specialists (especially non-numerical-analysts) in the development of software.  The broad range of users and developers to whom these programming systems are promoted is not well-served by having to know about and be able to debug around problems of this kind.   The avoidance of these pitfalls in programming instruction is revealing on this matter also.  The distributed human cost (a kind of externality) is inconsistent with the perpetuation of these models as a default, everyday exposure and risk.  That makes this habitual approach a false economy and we need a better way to allow for tight control where it is appropriate and provide safer and unsurprising default operations otherwise.  [Since we can't impact the C/C++/Java/C# progression at this point, we need some fresh thinking.  We probably can impact the CLI though.]
  2006-03-25 Remember to emphasize that these gotchas figure in all programming systems that employ non-decimal floating-point arithmetics.  Incommensurality with decimal fractions (actually, 1/5) applies to java and C#, not just C/C++.  The feature exists in older languages (Fortran) and also those languages that are more careful with their non-floating-point arithmetic (LISP, Scheme, Squeak/Smalltalk), scripting languages, and spreadsheet/office applications (Excel for non-decimal floating point, etc.)
  2006-03-25 Conduct an experiment to see if the binary floating-point input-output forms are supported in the VC++ versions I am using.  (I wonder if those made it into the ISO specification.)  If so, the use of these when (more-) reliable preservation/interchange of binary forms is involved.
  2006-03-25 This initial experiment suggests to me many ways that the material needs to be refactored for a treatment of computer arithmetic as part of toolcraft and as part of nfoWare at the informal level.
  2006-03-25 Move the items that are tangential to this initial treatment to the job jars or project ideas where they belong.
  2006-03-25 T060301b: When there's an 0.10 or better version of the T060301c material, include it as the latest even though there may be a different approach later.
  2006-03-25 The MSDN Online material on #pragma, #message, and #error is very useful for what it shows about dereferencing pre-processor variables.  Look at that for an explanation of showdefs and possible generalization of that for "command files" (apparently the new name for "response files").   I will be using *.opt so I suppose they should be called "[command] option files" although they are really command parameters.  The parameter file can be included in a source comment as a way of tying down this dependency better than we ordinarily do it.
  2006-03-25 float5.c: in the description in front of the pre-processor magic, it is the "compiler-option settings and defaults" that we can't tell at pre-processor time.  We also haven't made any provision for run-time discovery, something that could be explored in a different way (and look at Plauger for possible sources of programs that do this).
  2006-03-25 float5.c: reword the beginning about variability of controls and targets.  This is about compiler options and development/target platform dependencies to be said more clearly.
  2006-03-25 The incommensurate representation of rational fractions is an internal problem along with range and precision considerations.   They all figure in in-out conversions too.  A separate discussion and illustration is valuable at some point, along with tie-in to better treatments (e.g., Knuth).  This isn't even getting to the notion of accuracy and the impact of the nature of the data and the setting in which it is applied, how it is interpreted (cf. comp.risks).
  2006-03-25 float5.c: should we illustrate incommensurate floats - maybe include description in T060301c also or instead (there really needs to be a better illustration of incommensurate floats and how these work in binary)?
  2006-03-25 float5.c Include Creative Commons Notice, with link to the package of which it is a part.
  2006-03-24 T060301c.txt: also mention that the manifest can be linked into the VC++ 2005 project too.
  2006-03-24 float5.c" The top line of float5.c has 1.50 instead of the 1.60 used elsewhere.  Correct that some time when the package is being updated anyhow.  It is not necessary to recompile the executables unless I want to be really fussy.
  2006-03-24 Describe how to compile float5 and other programs from the command line too.
  2006-03-23 The gist here is not to solve the numerical analysis problem but to give people an appreciation of there being one and that they have the means to explore the computer arithmetic to see what the limits and edges are like, all as kitchen-table science.
  2006-03-23 I need to find the David Matula references at some point.
  2006-03-23 Add Plauger reference to the source materials. 
  2006-03-23 Make version of the source code that refers to its source here on nfoWare.  Rebuild the archive accordingly.
  2006-03-23 What's a model for characterizing calculations and input-outputs so one can be confident about the precision or that a given requirement of precision is achieved.
  2006-03-23 Learning to use scaling and control of intermediate values in precise calculations with inprecise representations.
  2006-03-23 Thinking of the editor classes for input and range control in Java and having the same kind of thing worked through there and in VC++ too. 
  2006-03-23 Compare the Plauger, 2003, and 2005 versions of <float.h> and see what we can learn of that.
  2006-03-23 It would appear that the situation is always underspecified and it is not clear what context-free variations provide if they can't be easily related to what comes up in a given usage situation and tied to the requirements stated in the application domain.
  2006-03-23 There are two cases of preservation: input to output and output to input.  Then there are what this says about the internal/external manipulations and how they are to be guarded.
  2006-03-23 And then there are the output cases and how that might make the numbers look better or not.
  2006-03-23 There are then the internal manipulations using floating-point arithmetic.
  2006-03-23 The floating point case starts with how numbers are input, whether as data or expressed as literals in the program.
  2006-03-23 Tie in the two compilers used to resources here under Toolcraft
  2006-03-23 Lessons around skill level and the clash of denominators: the lowest common denominator for use by a growing community of users and the specialized requirements of these simple cases, and the performance preoccupation, the lies of teachers, etc.
  2006-03-23 Lessons around input-output preservation, what goes on inside, etc.
  2006-03-23 I don't really want to open up this particular can of worms, but it is important for people to know it is there
  2006-03-23 Make a Prof. von Clueless post as a kind of continuation from the What You See Is Not What You Get. 
  2006-03-23 Describe the situation in terms of what is revealed and what can be demonstrated and tested for
  2006-03-23 Acknowledge the contributor of the original question
done
2007-08-13
2007-08-12


The Content Material here was successfully repaved as part of the
2007-08-04 stage of the Site Repaving Project.  Check those pages for additional details of the approach to correction and upgrade. 
Contact the nfoWare author with questions and to report any subsequent defects that you notice.

done 2007-08-13 Reflect the repaving in the Construction Structure and the toolNotes catalog
done
2007-08-13
2007-08-12 Repave the folio content: t060301, t060301a, t060301b, t060301c, t060301c.txt
done
2007-08-13
2007-08-12 Change to Construction Structure (Hard Hat Area): t060301, t060301a, t060301b, t060301c
done 2007-08-13 t060301c.txt: Update and change to UTF-8.  Then add it into the zip file and update everything.
done 2007-08-13 t060301c.zip Update with corrected file names and the new manifest so that it is consistent with the repaving.
done 2007-08-13 t060301b: The placeholder title becomes "Untrustworthy Arithmetic."
done 0.00 2006-03-25 T060301.htm Splice in the Diary & Job Jar and the first publishable level of T060301b/c into the front page of the folio so that it can stand alone better.
done 2006-03-25 Check the revision-history entries of these pages for proper formatting and indentation.
done 0.00
2006-03-25
2006-03-23 Link to the thread on MSDN Forum for VC++ 2005 Express Edition
done 0.00 2006-03-25 T060301c: The links to the .txt and .zip are bogus.  Correct both of them.
done 0.00 2006-03-24 T060301c: Include enough information so that the files can be found and it is clear how to download them.
done 2006-03-24 Move the images to the web site too.
done
2006-03-24
2006-03-23 Complete the Synchronized Manifest and Splice all to T060301c.zip
done 2006-03-23 Add T060301c.txt as the manifest for T060301c.zip
done 2006-03-23 Customize T060301b and T060301c as placeholders
done 2006-03-23

Create this page for immediate collection of action items and notes.

Revision History:
0.01 2007-08-13-13:05 Repaving Project
The folio content is repaved to conform to current construction structure and case-sensitivity of URLs and links.  Additional changes are initiated as part of the individual review.
0.00 2006-03-25-12:47 Create Initial Placeholder
Introduce an initial placeholder that serve as a target of links and provides a diary & job jar that can be employed immediately.  Create 0.00 placeholders and minimal content.

Construction Structure (Hard Hat Area)
Creative Commons License You are navigating nfoWare.
This work is licensed under a
Creative Commons Attribution 2.5 License.

created 2006-03-23-18:17 -0800 (pst) by orcmid
$$Author: Orcmid $
$$Date: 17-06-03 15:07 $
$$Revision: 46 $