EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  <19981999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  <19981999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Power PC floating point underflow
From: [email protected] (William Lupton)
To: [email protected], [email protected]
Date: Fri, 23 Oct 1998 08:29:15 -1000
Dear all,

Marty wrote:
>I also have three comments about [what William wrote]:
>>   Overflows, underflows and divide by zeroes are all errors and it is
>> reasonable that they should cause exceptions.
>
>1) It is not clear that under flows should be errors. For many
>algorithms they can be expected...

Actually I agree but, given that it was a programming error (indeed
mine!) that caused the underflow in the first place, I didn't feel that
I could argue in favor of masking my own error. After all, an operation
involving an uninitialized variable could just as easily lead to a
divide by zero as to an underflow.

Anyway, given Marty's test, it is clear that the default handling of
such exceptions varies from architecture to architecture, and this
certainly seems undesireable for EPICS systems.

Marty also wrote:
>... what should we do? one possibility is:
>a) provide a handler that issues an error and continues.
>b) provide the ability for user code to temporily disable trap or
>provide alternate handler.

In order to obtain the same behavior on the Power PC as on M680x0, I
think we simply need to ensure that all floating point tasks disable
underflow and overflow errors. Unfortunately this requires disabling
them for each task as it is created (because the default settings seem
to be compiled into VxWorks). This can presumably be achieved via a task
creation hook.

I propose that we do the above (I can try it out on the Power PC once we
once again have a board) in any case in order to restore consistent
bahavior. I think that Marty's suggestions (a) and (b) would both be
really useful, (a) to find where these errors are occurring (and maybe
give a traceback; come to think of it, that's the default behavior under
VMS) and (b) for cases where code may genuinely underflow or overflow
without any help from uninitialized variables.

William

Navigate by Date:
Prev: Re: Power PC floating point underflow Marty Kraimer
Next: Warning: snc bug... William Lupton
Index: 1994  1995  1996  1997  <19981999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Power PC floating point underflow Marty Kraimer
Next: Warning: snc bug... William Lupton
Index: 1994  1995  1996  1997  <19981999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·