Branchless Programming: Difference between revisions
Line 54: | Line 54: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
you can do | you can do | ||
<syntaxhighlight> | <syntaxhighlight lang="python"> | ||
y = 2 * (age > 10) - 1 | y = 2 * (age > 10) - 1 | ||
x = x + 10 * y | x = x + 10 * y |