Re: [Sdcc-user] single precision - computing sidereal time

2014-07-09 Thread Sebastien Lorquet
hello Maybe you can also use arbitrary precision fixed or floating point, using a bcd coding or not. example: using BCD, numbers from 0 to 99 with 14 decimal places uchar val1[16] = {0,6, 6,9,7,3,7,4,5,5,8,0,0,0,0,0}; //store 6.697374558 uchar vak2[16] = {0,0, 0,6,5,7,0,9,8,2,4,4,1,9,0,8}; //0

Re: [Sdcc-user] single precision - computing sidereal time

2014-07-09 Thread JuanPi
Hi, If you realy are into numerics, you can emulate doubles using floats. Here are some pointers http://stackoverflow.com/questions/6769881/emulate-double-using-2-floats At the endo of the day everythign is an integer, so you can always re implement double precision (from your link you will need o

[Sdcc-user] single precision - computing sidereal time

2014-07-09 Thread Daniel Michalik
Dear all, I'm trying to implement a conversion from solar (regular) time to sidereal time for astronomical purposes on a PIC16F1938. As far as I understand sdcc supports single precision only. I would like to ask for advice how to proceed. For the calculations necessary for the time conversion see