Jump to content

Leif Uneus

Members
  • Content Count

    74
  • Joined

  • Last visited

Posts posted by Leif Uneus


  1. 41 minutes ago, skyzoframe[hun] said:

    I want 0.1 micron precious movement over 6axis robot.

    First of all, precision depends on the hardware. If you have a 6 axis movement, how accurate is the movement of all those axis?

    Secondly, how is the movement controlled? Resolution? Error in the resolution?

    Last in that chain comes the controlling equipment, speed and other things that might concern the precision.

     


  2. 3 hours ago, Sherlock said:

    Oh, darn. I'm just lucky nobody depends on my numbers then...

    Threads can have different rounding modes.  Raymond Chen.  https://stackoverflow.com/q/72244777/576719  Are floating point operations deterministic when running in multiple threads?

     

    Some of your code may change the floating point settings, or even change them without restoring them.

    That goes for third party code in your program as well.

    And don´t get @David started with what dll's can surprise you with.

     


  3. 1 hour ago, Stefan Glienke said:

    You missed the point - when David mentioned that nobody should be using Extended he most likely stated a well-meant suggestion and did not include the "I started using Extended like decades ago and don't wanna change it" case.

    No, I know what he meant. And from a discussion we had a couple of years ago I can only agree. I may have to rewrite the code eventually if I move to another platform, but until then I have a well working application.


  4. 2 minutes ago, Stefan Glienke said:

    Carriages also once were the fastest way to travel - yet nobody today complains that he can't go onto the highway with one.

    At the time it was like a Concorde. Name a mean of travel that is faster for the public today. 


  5. 2 hours ago, David Heffernan said:

    True, but nobody should be using that type anyway. I speak as a developer of mathematical software.

    I'm nobody. I still use the extended type, and I'm a developer of mathematical software. 

    The algorithm was the only one that could be executed fast enough (and with the precision needed) in the days of Turbo Pascal.

    Sure, there are other algorithms today that has better performance without the extended types, but why invest time when it's still fully functional.


  6. @Fr0sT.Brutal

    The algo is using floating point values, hence the bad performance.

     

    I made a mistake in my previous code. There is a gap between MaxLongInt and the next upper boundry. Your code suffers from that too. Test with AltCntCaseTbl2(Int64(MaxLongInt)+1)

     

    Here is my correction: 

    function AltCntCaseTbl(v : Int64) : Int64; inline;
    begin
      if (v <= MaxLongInt) then begin
        if (v >= 1000000000) then Exit(10);
        if (v >= 100000000) then Exit(9);
        if (v >= 10000000) then Exit(8);
        if (v >= 1000000) then Exit(7);
        if (v >= 100000) then Exit(6);
        if (v >= 10000) then Exit(5);
        if (v >= 1000) then Exit(4);
        if (v >= 100) then Exit(3);
        if (v >= 10) then Exit(2);
        if (v >= 0) then Exit(1);
        Exit(0);
      end;
      if (v >= 1000000000000000000) then Exit(19);
      if (v >= 100000000000000000) then Exit(18);
      if (v >= 10000000000000000) then Exit(17);
      if (v >= 1000000000000000) then Exit(16);
      if (v >= 100000000000000) then Exit(15);
      if (v >= 10000000000000) then Exit(14);
      if (v >= 1000000000000) then Exit(13);
      if (v >= 100000000000) then Exit(12);
      if (v >= 10000000000) then Exit(11);
      Exit(10);
    end;

     


  7. Almost a magnitude faster algorithm:

     

    function AltCntCaseTbl( v : Int64) : Int64; inline;
      begin
        if (v < 0) then Exit(0);
        if (v > MaxLongInt) then begin
          if (v >= UInt64(10000000000000000000)) then Exit(20);
          if (v >= UInt64(1000000000000000000)) then Exit(19);
          if (v >= UInt64(100000000000000000)) then Exit(18);
          if (v >= UInt64(10000000000000000)) then Exit(17);
          if (v >= UInt64(1000000000000000)) then Exit(16);
          if (v >= UInt64(100000000000000)) then Exit(15);
          if (v >= UInt64(10000000000000)) then Exit(14);
          if (v >= UInt64(1000000000000)) then Exit(13);
          if (v >= UInt64(100000000000)) then Exit(12);
          if (v >= UInt64(10000000000)) then Exit(11);
        end;
        if (v >= UInt64(1000000000)) then Exit(10);
        if (v >= UInt64(100000000)) then Exit(9);
        if (v >= UInt64(10000000)) then Exit(8);
        if (v >= UInt64(1000000)) then Exit(7);
        if (v >= UInt64(100000)) then Exit(6);
        if (v >= UInt64(10000)) then Exit(5);
        if (v >= UInt64(1000)) then Exit(4);
        if (v >= UInt64(100)) then Exit(3);
        if (v >= UInt64(10)) then Exit(2);
        Result := 1;
      end;

     


  8. Hi Nizarazu,

     

    I did that two years ago.

    Had to correct some leaks from the github source and added more features.

     

    All I did to make it work was to install a graphic tool from Influx and make sure that real time data was flushed to my computer. Some Influx databases were also opened up for remote access.

    From there I was able to implement the same operations in a sample Delphi project.

     

    We are hosting a cloud service, where real time data from thousands of monitors and sensors are pushed into a central database.

    From there, data is validated, stored and pushed out again to the service subscribers. On site, reports and forecasts are made and presented.

     

    Most of the real time streaming and primary storage are made by InfluxDB tools. Validation, reports and presentation is mostly built with Delphi.

    We are planning to expand the Delphi tooling to avoid middle layers in connection to streaming in the near future.

     

    /Leif

     

    Edit: There is also a Delphi tool called QuickLogger that supports InfluxDB. See https://github.com/exilon/QuickLogger.

    Also available from Delphi GetIt Package Manager.

     


  9. 17 hours ago, Tom F said:

    The patch was not suggested on the Welcome screen, nor was it promoted on the default GetIt Package Manager screen. I expected it to be.

    Same here. I repeatedly closed the Welcome screen and opened it again with no luck.

    After I restarted the IDE it showed up though.

     

    A bug ???


  10. @dummzeuch and @Rollo62

     

    No matter if you use '123.4' or '123,4'. It gives error in position 4 with a result of 123.

     

    Oops, my bad.

     

    Indeed when a float is passed, '123.4' results in 123.4 with error = 0, while '123,4' results in 123 with error = 4.

     

    There must be an error in the docs:

    Quote

    Other than the optional sign at the beginning, all characters must be digits; decimal or thousands separators are not supported.

    Though one sentence later it says:

    Quote

    V is an integer-type or real-type variable. If V is an integer-type variable, S must form a whole number.

    Which implies that a real type must not be a whole number.

     

×