Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 19:26 17 Nov 2025 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 : CMM2 - scientific format

     Page 2 of 2    
Author Message
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3477
Posted: 03:48pm 25 Feb 2021
Copy link to clipboard 
Print this post

  Nimue said  Inadvertently I figured the i%=i%+1 needed to be inside the for loop.

Understandable. I didn't run the suggested code earlier because I couldn't see what the addition was supposed to show. (And maybe you're right.)
Edited 2021-02-26 01:52 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Nimue

Guru

Joined: 06/08/2020
Location: United Kingdom
Posts: 425
Posted: 04:02pm 25 Feb 2021
Copy link to clipboard 
Print this post

  lizby said  
  Nimue said  Inadvertently I figured the i%=i%+1 needed to be inside the for loop.

Understandable. I didn't run the suggested code earlier because I couldn't see what the addition was supposed to show. (And maybe you're right.)



I "obviously" (erm honestly)  figured that unless the for loop was actually doing something then any difference between int and float would be negligible.  

 

N
Entropy is not what it used to be
 
zeitfest
Guru

Joined: 31/07/2019
Location: Australia
Posts: 622
Posted: 08:29pm 25 Feb 2021
Copy link to clipboard 
Print this post

  Nimue said  The "issue" with mine was:

your code....

timer=0
for n%=1 to 1000000:next
i% = i% + 1
?timer


Inadvertently I figured the i%=i%+1 needed to be inside the for loop.

my code:

timer=0
for n%=1 to 1000000
  i% = i% + 1
next
?timer



Thanks !

(Cough, ahem, cough) yes you are both right       I was tired m'lud etc etc.
The point was, I don't think the empty loop is a good general test of floating point
Edited 2021-02-26 06:33 by zeitfest
 
     Page 2 of 2    
Print this page


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

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025