Hi Hlib2 and everyone

Yes, the algorism is quite good and I also could not find any other faster one.

I do not have old models such as fx-7400G or 9750G. Now I realize there is an restrictions on nested loops of type of **While**. Thank you for this.

The oldest model that I could port the algorism to is CFX-9850G. Same program file also runs properly on CFX-9850GC PLUS. Casio Basic of these models have some problems and do not allow simply running g1m files that run on fx-9860GII or 9750GIII. So I needed to modify to have them run on CFX-9850G range.

I also could port to fx-7400GIII, a next model of fx-7400GII.

I ported the nice algorism to Python mode (Casio Python) and C.Basic with **more** ... +2 +4 +2 +4 ... for faster process and also expanded to accept 15 digits input, because Casio Python and C.Basic has calculation accuracy of 15 digits. Casio Python runs very fast as well as C.Basic.

I also ported to many Casio graphing calculators from very old models to latest models as much as passible.

If you have any interest on details in source code, please download subsequent program files listed below.

1) Casio Basic for Newer model fx-7400GIII;

* Download: FactorGL for fx-7400GIII

* fx-7400GIII Casio Basic does not have Matrix functions, so I needed to replace matrices to lists in the program to make it work.

2) Casio Basic for CFX-9850G range (the oldest model that I could port);

* Download: Casio Basic - FactorG for CFX-9850G

* CFX-9850G range Casio Basic does not allow CR at beginning of line and at right after **Then** and **Else**, so I needed to remove CR at those above 3 cases from g1m program file that works on fx-9860G range and fx-9750GIII. This modification gives very poor readability on display.

3) Casio Basic for FX models (fx-9860G / GII / GIII, fx-9750GIII) & CG models (fx-CG10 / 20/ 50)

* Download: FactorG1

4) Python mode for fx-CG50, fx-9750GIII and fx-9860GIII;

* Download: FactorG ver 7.1 - supporting 15 digits input

* There was no turtle.py and matplot.py released when I made this, so I used my original user module, u.py including following functions (this modules is much more convenient to me);

- isCG(): determines FX model or CG model

- grp_color(): set color using several different ways for parameter settings

- circle(): draws circle

- line(): draws line

- locate(): sets position, size, color of output characters and parameter to transfer to VRAM or show on display

- frac(): gets decimal part

* How many times the algorism search, the search # is indicated. This has good relation to process time.

5) C.Basic for FX models (fx-9860G / GII / GIII, fx-9750GIII) and CG models (fx-CG10 / 20 / 50)

* Download: FactorG2 - fastest as much as possible

I measured process time for each then **C.Basic for CG on fx-CG50** gives fastest result that is much faster than built-in prime factoring feature of fx-991EX.

The second record is given by **Python mode of fx-CG50**, the third is **C.Basic for FX on fx-9750GIII**, fourth is **Python mode of fx-9750GIII**, then fx-991EX comes at the fifth.

To be honest, I wanted to make program faster than the built-in feature so I tried to make fastest programs on some different platforms.

If you have models of them, please have fun!

**Edited by Krtyski, 30 August 2021 - 11:15 PM.**