could somebody please explain how the fuck the answer is 2log2(9)?
Could somebody please explain how the fuck the answer is 2log2(9)?
Other urls found in this thread:
en.wikipedia.org
twitter.com
It isn't the answer is just log_2(9)
exactly what i thought... apparently not.
It's probably a printing error and was supposed to be without the prefix 2.
Also post these questions on /sci/ dumb questions thread.
ah ok, will do from now on, thanks user :)
It's because an exponent on a logarithmic argument is interchangeable with the prefix
alog(x) = log(x^a)
log thread?
Cont.
The base (_2) is unimportant in the context of the question so I will leave it out. Further regardless of whether it the base is 2, 100, e, or any value of b the procedure is the same
2log_2(3)
log(3^2)
log(9)
Yeah we all know this but there is now answer "log(9)" the closest is 2 log(9) which is probably just a printing error and which is why it confused OP. Non of the four options are right
Correction I borked my own procedure by adding the base to the first line. For the sake of completion I'll add the base
2log_2(3)
log_2(3^2)
log_2(9)
I hadn't noticed the misprint. I understand his confusion now, my mistake
this thread is not about what you like to eat
Can someone help me with *my* work now? How would i optimize this? It would take literal ages with this shitty code.
also forget the while mem list thing it wasn't supposed to be there
3^2 is 9.
Get rid of "Print()". There saved you 7 bytes
thanks lad
use R
screw R
fuck you
Hey man, this isn't about language it's about math. Now give a hint m8.
You can immediately exclude any odd number>1 and any number divisible by 4.
I already figured that much, im starting at 2 and only calculating every 4th. But it's still very very slow especially when it get over 1000000 it has to calculate a lot of divisors and check each of them.
What does the subscript 2 mean?
This
Did someone say log
>being in maths thread
>saying subscript to sound smart
Rather than calculating all divisors at once, how about only calculating to the first counter-example and breaking the loop?
add = true
for i in range(1,sqrt(n),1):
if not eulerlib.is_prime(i+n/i):
add = false
break
if add:
total+=n
Fucking formatting...
I wanted to be like a smart typesetter
en.wikipedia.org
Sounds solid I'll try that. Thanks lad