Français
Experimente

PrimTurbo dans Assembler by @Jonathan, avec Primfigur-représentation by p.specht

 

p.specht


'PrimTurbo dans Assembler (C) by @Jonathan
'une Primzahlensuche, qui abgeht comment sonstwas...
Fenêtre Style 1 | 8 | 16
cls
Déclarer données#, ZahlenAnzahl&, StartZeit&, JN$, PrimAnz&
'Erstellt avec dem XProfan Datengenerator, (C) Frank Abbing
Déclarer Code#
Faible Code#,164
Claire Code#
Long Code#,0=1397791846,1448563281,35048,-1959228672,12977264,21022208
Long Code#,24=37799424,54576640,71353856,88131072,104908288,121685504
Long Code#,48=16827904,16859334,441,-834977536,-796187532,311087363,1946286720
Long Code#,76=-1047834384,-487075445,-1957113717,-958790696,-788332285
Long Code#,96=-210315461,29087723,-1962934272,63013832,-150736757,225955387
Long Code#,120=-1048374902,16416770,-347868555,63474671,428425679,1499094878
Long Code#,144=-1654237093,321731,-854261760,-1957165221,49920
Imprimer "Primzahlen trouver jusqu'à: ";
Contribution ZahlenAnzahl&
Faible données#, ZahlenAnzahl& + 5
Long données#, 0 = ZahlenAnzahl&
Long données#, 4 = (Sqrt(ZahlenAnzahl&) + 1) \ 1

WhileLoop 0, @SizeOf(Code#) - 4

    Si @Long(Code#, &loop) = 123456789

        Long Code#, &loop = données#

    EndIf

Endwhile

Imprimer "Primzahlen volonté gesucht..."
StartZeit& = &gettickcount
@Call(Code#)
Dispose Code#
Imprimer »
Imprimer "Benötigte Zeit: " + @Str$((&gettickcount - StartZeit&) / 1000) + " Sekunden."
Imprimer "Gefundene Primzahlen: " + @Str$(@Long(données#, ZahlenAnzahl& + 1))
Imprimer »
' Statt Ausgabeteil adaptiert sur représentation einer Primel by P. Specht
' SetPixel ist malheureusement toujours verdammt lente!
Imprimer "Primzahlen comme S-PRIMEL représenter (J/N)? ";
Contribution JN$

Si @Upper$(JN$) = "J"

    declare x&,y&,c%,ri&,xx&,yy&,scale&
    Fenêtre 0,0 - %maxx,%maxy-52
    cls @rgb(207,207,207)
    xx&=width(%hwnd)*3/5
    yy&=height(%hwnd)*2/7
    c%=rgb(255,0,0)
    x&=0:y&=0:scale&=10' la mesure 1 : scale&

    WhileLoop 2, ZahlenAnzahl&

        Si non @Byte(données#, &loop)

            setpixel xx&+x&/scale&,yy&+y&/scale&,c%
            ri&=(ri&+1) mod 8

        EndIf

        Select ri&

            caseof 0:inc x&

            caseof 1:inc x&:dec y&

            caseof 2:dec y&

            caseof 3:dec x&:dec y&

            caseof 4:dec x&

            caseof 5:dec x&:inc y&

            caseof 6:inc y&

            caseof 7:inc x&:inc y&

        endselect

        inc c%

    Endwhile

EndIf

Dispose données#
Imprimer "\n Fertig! "
WaitInput
Fin
 
XProfan 11
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
18.04.2021  
 



Zum Experiment


Topictitle, max. 100 marque.
 

Systemprofile:

ne...aucune Systemprofil angelegt. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

s'il te plaît s'inscrire um une Beitrag trop verfassen.
 

Options du sujet

476 Views

Untitledvor 0 min.
N.Art21.07.2022
p.specht09.06.2022
Ernst21.07.2021
Glubbfan19.06.2021
plus...

Themeninformationen

cet Thema hat 1 participant:

p.specht (1x)


Admins  |  AGB  |  Applications  |  Auteurs  |  Chat  |  protection des données  |  Télécharger  |  Entrance  |  Aider  |  Merchantportal  |  Empreinte  |  Mart  |  Interfaces  |  SDK  |  Services  |  Jeux  |  cherche  |  Support

un projet aller XProfaner, qui il y a!


Mon XProfan
Privé Nouvelles
Eigenes Ablageforum
Sujets-La liste de voeux
Eigene Posts
Eigene Sujets
Zwischenablage
Annuler
 Deutsch English Français Español Italia
Traductions

protection des données


Wir verwenden Cookies seulement comme Session-Cookies à cause de qui technischen Notwendigkeit et chez uns gibt es aucun Cookies de Drittanbietern.

si du ici sur unsere Webseite klickst ou bien navigierst, stimmst du unserer Erfassung de Informationen dans unseren Cookies sur XProfan.Net trop.

Weitere Informationen trop unseren Cookies et en supplément, comment du qui Kontrolle par-dessus behältst, findest du dans unserer nachfolgenden Datenschutzerklärung.


d'accordDatenschutzerklärung
je voudrais keinen Cookie