These determine the assumed/default size of instruction operands, and restricts which opcodes are available, and how they are used.
Modern operating systems, booted inside Real
mode,
/// <summary> | |
/// Fast exponential approximation. | |
/// </summary> | |
/// <remarks> | |
/// Based on "A Fast, Compact Approximation of the Exponential Function" by Nicol N.Schraudolph (1999) | |
/// <code>e^x ~ a*x + b | |
/// a = 2 ^ (mantissa bits) / ln(2) ~ 12102203 | |
/// b = (exponent bias) * 2^(mantissa bits) ~ 1065353216</code> | |
/// </remarks> | |
/// <param name="x">A number specifying a power.</param> |
int doubler(int x) { | |
return 2 * x; | |
} |
using System; | |
using System.Numerics; | |
namespace Common | |
{ | |
/// <summary> | |
/// Arbitrary precision decimal. | |
/// All operations are exact, except for division. Division never determines more digits than the given precision. | |
/// Source: https://gist.github.com/JcBernack/0b4eef59ca97ee931a2f45542b9ff06d | |
/// Based on https://stackoverflow.com/a/4524254 |
What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.
In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.
Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th
There are plenty of tutorials online on how to install clang on windows with visual studioIDE and MinGW. However, there are none on clang with visual studio build tools.
%VS2017BuildToolsDir%
= installation directory of VS 2017 build tools
# .github/workflows/publish.yml | |
name: Generate a build and push to another branch | |
on: | |
push: | |
branches: | |
- master # Remove this line if your primary branch is "main" | |
- main # Remove this line if your primary branch is "master" | |
jobs: |