Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

added 51 characters in body
Source Link
S.S. Anne
  • 3.4k
  • 11
  • 31

C (gcc), Precision limited by built-in types, (削除) 42 (削除ここまで) 36 bytes

__int128 f(__int128 n){n/=sqrtl(2);}

Try it online! Try it online!

Floor for the most part but the last output is ceiling.

Uses GCC's __int128 type: shorter in text length than unsigned long, and can represent every value in unsigned long, and also determined to not be a builtin type. Stay tuned for 6-8 weeks to get arbitrary precision.

-6 bytes thanks to Peter Cordes !

C (gcc), Precision limited by built-in types, (削除) 42 (削除ここまで) 36 bytes

__int128 f(__int128 n){n/=sqrtl(2);}

Try it online!

Floor for the most part but the last output is ceiling.

Uses GCC's __int128 type: shorter in text length than unsigned long, and can represent every value in unsigned long, and also determined to not be a builtin type. Stay tuned for 6-8 weeks to get arbitrary precision.

C (gcc), Precision limited by built-in types, (削除) 42 (削除ここまで) 36 bytes

__int128 f(__int128 n){n/=sqrtl(2);}

Try it online!

Floor for the most part but the last output is ceiling.

Uses GCC's __int128 type: shorter in text length than unsigned long, can represent every value in unsigned long, and determined to not be a builtin type. Stay tuned for 6-8 weeks to get arbitrary precision.

-6 bytes thanks to Peter Cordes !

added 51 characters in body
Source Link
S.S. Anne
  • 3.4k
  • 11
  • 31

C (gcc), Precision limited by built-in types, 42(削除) 42 (削除ここまで) 36 bytes

__uint128_t__int128 f(__uint128_t__int128 n){n/=sqrtl(2);}

Try it online!

Floor for the most part but the last output is ceiling.

Uses GCC's __uint128_t__int128 type; largest integer type available, unsigned, and: shorter in text length thanunsigned long, and can represent every value in unsigned long, and also determined to not be a builtin type. Stay tuned for 6-8 weeks to get arbitrary precision.

C (gcc), Precision limited by built-in types, 42 bytes

__uint128_t f(__uint128_t n){n/=sqrtl(2);}

Try it online!

Floor for the most part but the last output is ceiling.

Uses GCC's __uint128_t type; largest integer type available, unsigned, and shorter in text length than unsigned long. Stay tuned for 6-8 weeks to get arbitrary precision.

C (gcc), Precision limited by built-in types, (削除) 42 (削除ここまで) 36 bytes

__int128 f(__int128 n){n/=sqrtl(2);}

Try it online!

Floor for the most part but the last output is ceiling.

Uses GCC's __int128 type: shorter in text length thanunsigned long, and can represent every value in unsigned long, and also determined to not be a builtin type. Stay tuned for 6-8 weeks to get arbitrary precision.

Source Link
S.S. Anne
  • 3.4k
  • 11
  • 31

C (gcc), Precision limited by built-in types, 42 bytes

__uint128_t f(__uint128_t n){n/=sqrtl(2);}

Try it online!

Floor for the most part but the last output is ceiling.

Uses GCC's __uint128_t type; largest integer type available, unsigned, and shorter in text length than unsigned long. Stay tuned for 6-8 weeks to get arbitrary precision.

AltStyle によって変換されたページ (->オリジナル) /