|
素数を求めて常用対数をとり、概数? で表記しています
OPTION ARITHMETIC NATIVE
LET S=LOG10(2)
LET COUNT=1
FOR I=3 TO 1300001 STEP 2
LET FL=0
FOR J=3 TO SQR(I) STEP 2
IF MOD(I,J)=0 THEN
LET FL=1
EXIT FOR
END IF
NEXT J
IF FL=0 THEN
LET S=S+LOG10(I)
LET COUNT=COUNT+1
IF MOD(COUNT,1000)=0 THEN
PRINT "P";STR$(COUNT);"# =";10^(FP(S)-1);"* 10 ^";INT(S+1)
END IF
END IF
NEXT I
END
|
|