9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Arithmetic on Plan 9
@ 2007-07-25 15:51 tlaronde
  2007-07-25 15:57 ` [9fans] " tlaronde
  2007-07-25 16:25 ` [9fans] " andrey mirtchovski
  0 siblings, 2 replies; 5+ messages in thread
From: tlaronde @ 2007-07-25 15:51 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hello,

I'm working on KerGIS, a BSD licenced revival of CERL GRASS, in order to
make it compile and run on Plan 9 too---at the moment, it compiles and
runs on any POSIX Unix flavour.

Even if a huge amount of work has already been done for cleaning,
reorganizing and extending the original sources, confrontation with Plan
9 shows that it is far from being, if not ideal, even sensible in some
area.

The first step---for Plan 9---will be a compilation using APE, and the
development of a graphical visualization using Plan 9 libdraw.

But I need too, for Plan 9 and others, to isolate correctly arithmetic
operations (I include not only integers but floats too in this
expression) in order to identify correctly the domain of definition of
the algorithms.

AFAIK, ISO C for examples does not mandate anything about integer
overflows (may silently wraps). C99 has added some support for IEEE754,
but the handling of "exceptions"---that may or may not be faults---is
still fuzzy for me.

Calculus is, if I'm not mistaken, a typical "userland" stuff. But it
involves, obviously the machine---MMIX[1] for example has distinct
instructions for not signaling integer arithmetic and signaling i.e.
unsigned integers operations silently wrap while signed overflow---, the
language and the compiler---is C enough to access all the capabilities
of the hardware or is assembly required---, and the operating
system---for the policy on notes.

So some questions (hoping at least some of them make sense):

1) Is there a Plan 9 policy concerning the "notes" (exceptions) on
arithmetic operations, both integer and float?

2) Concerning float, if the FPU is a (from the ISA point of
view) separate entity, are registers put in a known state on process
entry?

3) Is there some high level arithmetic homogeneous behavior between
machines---a IEEE754 behavior even on machines lacking a compliant FPU,
or lacking a FPU?

4) Is there a way, via C, to handle extended precision on IEEE754, or is
assembly required (even if the assembler does not provide directly the
symbolic opcodes, embedding directly the values is possible)?

I just discover libgeometry and arith(2) etc. so I suspect reading these
sources will help.

But if somebody has a résumé or pointers, it will be greatly
appreciated.

TIA,
-- 
Thierry Laronde (Alceste) <tlaronde +AT+ polynum +dot+ com>
                 http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-07-25 22:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-25 15:51 [9fans] Arithmetic on Plan 9 tlaronde
2007-07-25 15:57 ` [9fans] " tlaronde
2007-07-25 16:25 ` [9fans] " andrey mirtchovski
2007-07-25 18:22   ` tlaronde
2007-07-25 22:52   ` tlaronde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).