Jump to content
skyzoframe[hun]

Algorithms. Irrational numer storage.Playing with 6 axis robot.

Recommended Posts

Hi all. How to solve, one kind of irrational number storage in float? (For example Pi value) ( second reason. I want to solve a movement over an axis, in the most precious way over an help of pascal programing.) Regards k.z.

Edited by skyzoframe[hun]

Share this post


Link to post
4 minutes ago, David Heffernan said:

You can't store pi exactly in a float. What is the motivation for the question?

I want 0.1 micron precious movement over 6axis robot.

Share this post


Link to post

I got one MASTER coordinate system. After that 6 slave. That depends of each other in one kind of linear way. My problem is the first axis movement. (Because of reverse engineering)

Edited by skyzoframe[hun]

Share this post


Link to post
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.

 

Edited by Leif Uneus

Share this post


Link to post
8 minutes ago, Leif Uneus said:

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.

 

I want to adapt to the maximum software possibilities within the limits of Pascal.  The hardware constans in this case.( One kind of parameter)

Edited by skyzoframe[hun]

Share this post


Link to post

Apart from the controller hardware (an element that should not be underestimated), on the numerical calculation part currently in hardware the precision you can obtain is in EXTENDED (80 bit) for 32 bit software and DOUBLE (64 bit) for 64 bit software .

If you want to go beyond these limits you have to use libraries that take advantage of HW + SW to increase calculation precision.

I can point this out to you, even though I've never used it.

 

https://github.com/TurboPack/RudysBigNumbers

 

Good luck

  • Like 2

Share this post


Link to post

We have equipment for linear movement that is controlled by 4 nanometer precision. All controlled by stepper motors with the help of integers.

Even though it is pascal, the programming language is not important. 

  • Like 1

Share this post


Link to post

The things you are discussing now seem unrelated to storing pi in a float. I don't feel as though we understand the problem domain yet. 

Share this post


Link to post

I feel like the size of the structures or movements are almost irrelevant as long as you don't change magnitudes. As @Leif Uneus said, integers could be enough. Any calculations could be done on the fly, as movements are almost always slower than calculating speed.

  • Like 1

Share this post


Link to post

In my applications (even with robot guides) I also tend to use only integers (for example managing the vector of the last movement section precisely with integers), but having carried out several applications with robots I must say that often the float calculations are unavoidable, for example if you have to perform non-linear movements, perhaps using "quaternions".

So it could be that the request made by @skyzoframe[hun] in this thread is legitimate and that its use is also a necessity.

 

Bye

  • Like 2

Share this post


Link to post
2 hours ago, DelphiUdIT said:

 

So it could be that the request made by @skyzoframe[hun] in this thread is legitimate and that its use is also a necessity.

You mean the request to store pi exactly in a float ? 

Share this post


Link to post
1 hour ago, David Heffernan said:

You mean the request to store pi exactly in a float ? 

Pi was an example, I meant using an "irrational" number with a float, i.e. increasing the number of significant digits in the calculation...at least I think that's what @skyzoframe[hun] wanted suggestions on.

  • Like 1

Share this post


Link to post
19 hours ago, David Heffernan said:

Even rational numbers aren't exactly representable. Examples include 1/3 and 1/10.

Cube face diagonal or cube space diagonal. Irracional numbers also. (Cube edge 1 integer) 

Edited by skyzoframe[hun]

Share this post


Link to post
34 minutes ago, skyzoframe[hun] said:

Cube face diagonal or cube space diagonal. Irracional numbers also. (Cube edge 1 integer) 

I don't know what this means 

Share this post


Link to post

Yes but it's hard to see the relevance. Representable numbers have the form k*2^n. Perhaps you don't actually need exact representability. We don't know what your requirements are. 

Edited by David Heffernan
  • Like 1

Share this post


Link to post
45 minutes ago, David Heffernan said:

Yes but it's hard to see the relevance. Representable numbers have the form k*2^n. Perhaps you don't actually need exact representability. We don't know what your requirements are. 

Many irrational numbers must be used in 3D space. my problem is that it has to be stored in memory. usually in float value. which causes an error if I work in six axes

Share this post


Link to post
Just now, skyzoframe[hun] said:

Many irrational numbers must be used in 3D space. my problem is that it has to be stored in memory. usually in float value.

You can see that it's impossible to store irrational numbers in floats. Indeed even rationals can't be stored exactly in floats, unless they can be expressed as above, k*2^n.

  • Like 1

Share this post


Link to post
4 minutes ago, David Heffernan said:

You can see that it's impossible to store irrational numbers in floats. Indeed even rationals can't be stored exactly in floats, unless they can be expressed as above, k*2^n.

if I slice 3D into 2D surface. What do you mean about [k*2^n] What do you mean?

Share this post


Link to post

K and n are integers. All representable floats are of the form k*2^n. So 1/3, 1/10 aren't of that for, and aren't representable. 

 

I doubt that you need to store these numbers exactly. But we don't know your requirements. 

Edited by David Heffernan
  • Like 1

Share this post


Link to post

Should I have to check every coordinate value in every runtime because of the main coordinate array what I use? I am confused right now...

Share this post


Link to post

I've no idea what your requirement is and what the problem is. You don't seem to understabd how floats work. I don't think this is going to be productive. 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×