C++Guns – RoboBlog

30.05.2020

C++ Guns - Spassvergleich Fortran77 Fortran95 C++11

Filed under: Allgemein — Tags: , — Thomas @ 16:05

Links oben: Original Fortran77 Code. Rechts oben: Fortran95. Keine GOTOs, keine Labels, keine Spaltenbeschränkung, Sortieralgorithmus identifiziert Unten: C++. Standard Sortieralgorithmus, keine expliziten Array Zugriffe Click to enlarge Ja, die genaue formatierte Ausgabe auf die richtige Nachkommastelle ist im C++ Code nicht enthalten. Diese formatierte Ausgabe in Text Dateien ist auch heute nicht mehr relevant.

06.05.2020

C++ Guns: generate random bits - std C++ way

Filed under: Allgemein — Tags: — Thomas @ 05:05

I found only one std C++ way to generator random bool value: using std::bernoulli_distribution. It returns bool values and has a default constructor with probability p=0.5. So the generated boolen are "uniform" distributed. This is perhaps the slowest variant. The internet is full of better ideas. Some use std C++ random classes but they all […]

Powered by WordPress