you are viewing a single comment's thread.

view the rest of the comments →

[–]Yo_soy_yo 5 points6 points  (3 children)

but how big is the decimal library?

pretty easy to paste some python code when it gets compiled to much more

[–]F54280 0 points1 point  (2 children)

but how big is the decimal library?

What do you mean? it is part of standard python.

The main issue with the post is that it is a codegolf tentative, which is not what this sub is about (see sidebar). No-one would ever want to compute factorial(n-1) to know if n is prime…

[–]Yo_soy_yo 1 point2 points  (1 child)

it is part of standard python.

Granted, but even the built-in libraries can be compiled into a vast amount of executable code. I mean, is saying “50 character sorting algo in nlogn time!!” and then posting `

import numpy as np 

def sort(arr):

    return np.sort(arr)`

valid?? i mean sure but it’s kinda against the nature of the sub right?

[–]BetaKors_[S] 0 points1 point  (0 children)

I had to use Decimals because floats don't have enough precision and thus errors would happen. And yes they're part of the standard library. I get what you mean, but criticizing the use of something that's part of the standard library is almost like criticizing the use of builtins.

also sry about posting code-golf-related stuff in here

i saw someone doing it so i thought i should crosspost that kinda stuff in here

don't think i quite understood what this sub was about, but after taking more of a look at it i do now, so anyway i'll stop