[F/OS] NumberChecker - Prime , Even , Odd

NumberChecker

it is simple extension to check number if it is prime or even or odd

picture of all the blocks

Untitled00

AIX Download link :

V1

mh.math.numberchecker.aix (3.6 KB)

V2

mh.math.numberchecker.aix (3.7 KB)

AIA Download link :

Coming soon

Source Code

7 Likes

Nice Extention. good work

1 Like

thanks … :smiling_face_with_three_hearts:

1 Like

3 is a prime number but your extension shows false why :expressionless:??

Google :
image

5 Likes

I’ve submitted a PR that should fix the prime number checker (and theoretically make it a bit faster).

1 Like

Sorry add screenshot before using aix , but now fixied

Sorry I deleted the old version and add new version
please check it …

nice example to learn writing extensions…

btw. for large numbers your CheckNumberIsPrime method will block the UI thread…
you might want to think about providing an asynchronous method for large numbers…

Taifun

1 Like

Thanks siir

I try it in some larg number from this picture it is work

فهرس

this is not very large…
see here

try 327593272339140276736912765409

Taifun

1 Like

this is very larg it will get false

maybe i will provid it in the future

Can Be done without any extension

Testing APK
prime (1).apk (5.1 MB)



~Yours Faithfully
Enderman

3 Likes

well done
however also your example will block the UI thread…
try a very large number, for example 327593272339140276736912765409

Taifun

1 Like

I am trying to do it but there is some problem With large numbers. I will make it within some days. I have done how it is done in real life. Same in real life it would take hours to do it with large numbers