Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : MM - Leap Year Y or N?
Page 2 of 2 | |||||
Author | Message | ||||
Nixie Regular Member Joined: 19/02/2013 Location: AustraliaPosts: 66 |
Hi Jim, that's a useful bit of code. Thanks for sharing. I don't know what the limitations are with the 32 bit floating point maths, but will " have a play". 73 Nic. |
||||
BobD Guru Joined: 07/12/2011 Location: AustraliaPosts: 935 |
Nixie I was looking for some info to reply to a private message and re-discovered this document about Julian dates. I must have got the info sometime back when I was doing this stuff. It may (or not) be useful Bob 2013-06-24_013648_Julian_Day_Numbers.pdf |
||||
Nixie Regular Member Joined: 19/02/2013 Location: AustraliaPosts: 66 |
Thanks BobD! Yes, it is useful. Trouble is with all of these things, I start with an idea, implement it, then all the other ideas come flooding in - I just love it! Providing more information like this is always welcome. Then there is the intellectual aspect of making any code, smaller, neater and faster! One thing is for sure, I will ever be bored, so long as I have my interest in the MaxiMite Best regards, Nic. |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6100 |
The range of integers (whole numbers) that can be manipulated without loss of accuracy is ±16777100. Any floating point number will have a maximum of 7 and a bit significant figures before loss of accuracy. This means that we cannot use full Jullien dates with decimal for parts of the day and we cannot use UNIX time. Jim VK7JH MMedit  MMBasic Help |
||||
MicroBlocks Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
That reminds me of BIG INTEGERS. :) Maybe time for a BIG float. 64 it instead of 32. It won't be fast or easy. Microblocks. Build with logic. |
||||
Dylan Regular Member Joined: 17/06/2013 Location: NetherlandsPosts: 81 |
float farg1, farg2, fret; // the two float arguments and returned value
Although the "simple" (yes, I know it takes more work than just changing float to double) solution will break all existing code (that depends on either speed or memory size not halving), it should be "relatively" easy. Back in 1991 my project was to implement big integers in a C compiler; I ended up using C++ for its operator overloading for the compiler side and only a quarter of what I wanted to, but my BIG INTEGERS were up to 64k(bytes). Ah, the days that are no more. |
||||
Page 2 of 2 |
Print this page |