Comment

Comment by xyproto

To me, it's because it doesn't feel reliable by default. For example:

Python:

  >>> 2**2**2**2**2
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  ValueError: Exceeds the limit (4300) for integer string conversion

C:

  #include <stdio.h>
  #include <stdlib.h>
  #include <math.h>
  
  int main(int argc, char* argv[])
  {
   printf("%.0lf\n", pow(pow(pow(pow(pow(2, 2), 2), 2), 2), 2));
   return EXIT_SUCCESS;
  }
  
  % gcc -o main -std=c18 -O2 -pipe -fPIC -fno-plt -fstack-protector-strong main.c && ./main
  4294967296

Julia:

  julia> 2^2^2^2^2
  0
parent xyproto 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton