Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 00:26 28 Nov 2024 Privacy Policy
Jump to

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: Australia
Posts: 66
Posted: 02:50am 23 Jun 2013
Copy link to clipboard 
Print this post

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: Australia
Posts: 935
Posted: 03:38pm 23 Jun 2013
Copy link to clipboard 
Print this post

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: Australia
Posts: 66
Posted: 03:59pm 23 Jun 2013
Copy link to clipboard 
Print this post

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: Australia
Posts: 6100
Posted: 02:54pm 24 Jun 2013
Copy link to clipboard 
Print this post

  Nixie said  
I don't know what the limitations are with the 32 bit floating point maths, but will " have a play".
73 Nic.


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: Thailand
Posts: 2209
Posted: 03:27pm 24 Jun 2013
Copy link to clipboard 
Print this post

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: Netherlands
Posts: 81
Posted: 05:36am 25 Jun 2013
Copy link to clipboard 
Print this post

  TZAdvantage said   That reminds me of BIG INTEGERS. :)
Maybe time for a BIG float. 64 it instead of 32.
It won't be fast or easy.



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


To reply to this topic, you need to log in.

© JAQ Software 2024