EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: Store 64-bit integer in asyn parameter library?
From: Luca Cavalli <[email protected]>
To: Mark Rivers <[email protected]>, "J. Lewis Muir" <[email protected]>
Cc: EPICS Tech-Talk <[email protected]>
Date: Sat, 19 May 2018 07:14:17 +0000
Hi,

you can even provide both a string representation for GUI display and low and high parts as 32 bit integers for further processing (after 64 bit integer reconstruction by the consumer).

Ciao,

Luca


Da: J. Lewis Muir
Inviato: sabato 19 maggio, 00:21
Oggetto: Re: Store 64-bit integer in asyn parameter library?
A: Mark Rivers
Cc: EPICS Tech-Talk


On 05/18, Mark Rivers wrote: > This might actually be a good case to use a double. You get exact > representation for 52 bits, i.e. 20 bits more than int32, or 1M times > higher rate. Interesting. So that's for the IEEE 754 double-precision binary floating-point format (64-bit). Assuming epicsFloat64 is that, then the maximum integer, such that it and all smaller integers can be represented exactly, is 2^53 = 9,007,199,254,740,992 according to [1] and [2]. And I believe the minimum is just the negation of that since the sign has its own bit. I had to go read about the 64-bit format [3], and apparently there's one more bit available for the signficand, sometimes referred to as the hidden bit, which is where the 53 comes from (i.e., 52 + 1). The 64-bit format stores the number in binary normalized form, so the first bit will always be 1, so it is omitted, thus gaining one extra bit for the significand. Anyway, I guess I'll use asynParamFloat64, then, and return an error if the bit rate is less than -2^53 or greater than 2^53. Thanks! Lewis [1] https://stackoverflow.com/a/1848762 [2] https://stackoverflow.com/a/1848953 [3] https://en.wikipedia.org/wiki/IEEE_754-1985

 



<< Le informazioni contenute in questo messaggio di posta elettronica e relativi allegati sono riservate e confidenziali e ne è vietata la diffusione in qualunque modo eseguita. Qualora Lei non fosse la persona a cui il presente messaggio è destinato, La invitiamo ad eliminarlo e a darcene gentile comunicazione. Quanto precede ai fini del rispetto delle Legge 675/96 e del Decreto Legislativo 30/06/2003 n.196, sulla tutela dei dati personali >>

<< This e-mail is confidential and may well also be legally privileged. If you have received it in error, you are on notice of its status. Please notify us immediately by reply e-mail and then delete this message from your system. Please do not copy it or use it for any purposes, or disclose its contents to any other person: to do so could be a breach of confidence. Thank you for your co-operation. Please contact our IT Helpdesk on +3902380481 or email [email protected] if you need assistance >>
 


References:
Store 64-bit integer in asyn parameter library? J. Lewis Muir
Re: Store 64-bit integer in asyn parameter library? J. Lewis Muir
Re: Store 64-bit integer in asyn parameter library? Mark Rivers
Re: Store 64-bit integer in asyn parameter library? J. Lewis Muir
Re: Store 64-bit integer in asyn parameter library? Mark Rivers
Re: Store 64-bit integer in asyn parameter library? J. Lewis Muir
Re: Store 64-bit integer in asyn parameter library? Mark Rivers
Re: Store 64-bit integer in asyn parameter library? J. Lewis Muir

Navigate by Date:
Prev: Re: Store 64-bit integer in asyn parameter library? J. Lewis Muir
Next: NSLS2 Debian problem? Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Store 64-bit integer in asyn parameter library? J. Lewis Muir
Next: Re: Store 64-bit integer in asyn parameter library? J. Lewis Muir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
ANJ, 19 May 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·