r/programminghumor • • 12d ago

I mean...

Post image
212 Upvotes

7 comments sorted by

7

u/Slow-Television-5303 12d ago

0110 and 1001… !6==9

0

u/stupid-tweaker 11d ago

3

u/CANES2ND 11d ago

I thought that was subfactorial

3

u/Avatar_Yaksha 10d ago

Factorials have the exclamation mark after the number. If you're concerned about !=, there's probably a different notation for factorials in programming languages.

1

u/RareAdvertising361 8d ago

double factorial(unsigned int a){

double result=1;

for (unsigned int i=1;i<=a;i++){

result*=i;

}

return result;

}

1

u/TrunkTrick 2d ago

actually, we have subfactorial in math, like :
$$!n = n! \sum_{k=0}^{n} \frac{(-1)^k}{k!} = n! \left(1 - \frac{1}{1!} + \frac{1}{2!} - \frac{1}{3!} + \cdots + \frac{(-1)^n}{n!}\right)$$

Just ask your llm to render this LATEX

1

u/TrunkTrick 2d ago

I think what he want to convey is 6 == 9 is not true, as `!` is often used in coding to notify a logical reverse, in that case, 6 != 9 is a better choice