Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7676 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi there, just want to know how to capture all the prime number between a range and then store the result into a field.

Regards,

Henry

Posted

Hi Henry,

How about a few examples of the text/field data that contains "prime number between a range" so we can see the patterns involved.

Lee

Posted

The example is for the number range 10 to 20 ( the range can define by user), the result will be

11, 13, 17, 19

The end result can store in a text field and seperate each number by a return "

Posted

Addition information

The range is define with 2 number field, it is define by user, user can key in the range themself. After they key in the two number, they can click a button to capture/calculate out all the prime number between the range.

another example: range :P 20 to 35

the result will be : 23, 29, 31

Regards,

Henry

Posted

While the Sieve of Eratosthenes method can be efficient in certain situations such as a very large range, or a small range that starts at a very high number, it is hard to implement a fast version in Filemaker because of the speed of record creation. I think in this case, the old brute force method is actually quicker. See attachment.

FindPrimes.fp5.zip

This topic is 7676 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.