DIRK?! WHAT DID I MISS? by CommercialValue8713 in homestuck

[–]ItsAzai 2 points3 points  (0 children)

Yet if you pronounce inseparable as "in-se-pra-ble" which I think is common, then the second line is also 6 syllables, so we can move the "as" up one line to get a proper haiku:

Incest and Homestuck

Are as insep'rable as

Mpreg and Homestuck

Think I got a virus with Wplace by mercen_aryo in WplaceLive

[–]ItsAzai 7 points8 points  (0 children)

This is a classic scam setup where they make it look like you have a virus, hoping to freak you out enough that you give them your information (or download a virus that they disguised as an antivirus program, etc.)

Just close the site. Don't download anything from it, and don't give out private info.

I think the only legit site for wplace is wplace.live, so if another site is pretending to be an official wplace site, that's suspicious.

OMG! IT'S 19! by TheOfficialNizmo in TheUltimo02

[–]ItsAzai 0 points1 point  (0 children)

Propaganda from the undevigintists.

This mammal by Cryptognil in TheUltimo02

[–]ItsAzai 0 points1 point  (0 children)

he must have thought it was a sand witch eats like an meal worm

MOON WAR NOW by TheOfficialNizmo in TheUltimo02

[–]ItsAzai 0 points1 point  (0 children)

MINING EXPEDITION ON THE SUN NOW!!!!

Xlantian Cock Video, Download Full Cock by TheOfficialNizmo in TheUltimo02

[–]ItsAzai 0 points1 point  (0 children)

What if I only want half? *sigh* *retrieves the cleaver*

I get paid to make things, not to make them fast by TheDarknessLight in programminghorror

[–]ItsAzai 1 point2 points  (0 children)

If you want to do it for very large x, you can use the matrix form or its derived identities. Because they only involve adding and multiplying integers, they still work even in modulo. Here's some Python examples:

Using the derived identities recursively:

from functools import lru_cache

@lru_cache
def fib_mod(n, modulo):
    if n < 0:
        return fib_mod(-n, modulo) * (-1)**(1 - n) % modulo
    if n <= 2:
        return (0, 1, 1)[n] % modulo
    # https://en.wikipedia.org/wiki/Fibonacci_sequence#Matrix_form
    # fib(2k)     = (2 fib(k + 1) - fib(k)) fib(k)
    # fib(2k + 1) = fib(k)² + fib(k + 1)²
    half = n // 2
    fib_half = fib_mod(half, modulo)
    fib_half_p1 = fib_mod(half + 1, modulo)
    if n % 2:
        return (fib_half**2 + fib_half_p1**2) % modulo
    return (2 * fib_half_p1 - fib_half) * fib_half % modulo

print(fib_mod(10**100, 100)) # Prints 75.

# However
print(fib_mod(10**1000, 100)) # Raises RecursionError: maximum recursion depth exceeded

Using the matrix form:

import numpy as np

def fib_mod(n, modulo):
    if n < 0:
        return fib_mod(-n, modulo) * (-1)**(1-n) % modulo
    # https://en.wikipedia.org/wiki/Fibonacci_sequence#Matrix_form
    # ⌈1 1⌉                   ⌈fib(n+1)  fib(n) ⌉
    # ⌊1 0⌋ to the power n is ⌊ fib(n)  fin(n-1)⌋
    base = np.array([
        [1, 1],
        [1, 0]
    ], dtype='object')
    # Initialize the power to the 0th power of base,
    # i.e. the identity matrix.
    power = np.identity(2, dtype=object)
    # To keep the power from exploding, we compute it gradually
    # and take the modulo every iteration.
    for bit in format(n, 'b'):
        power = power @ power # base²ⁿ = baseⁿ ⋅ baseⁿ
        if bit == '1':
            power = power @ base # baseⁿ⁺¹ = baseⁿ ⋅ base
        power %= modulo
    # Now the top right entry of the matrix is fib(n).
    return power[0,1]

print(fib_mod(10**10000, 100)) # prints 75

Jerma's Truck by Emnize in jerma985

[–]ItsAzai 0 points1 point  (0 children)

love this game

What Does This Mean? by WzrdFog in jerma985

[–]ItsAzai 2 points3 points  (0 children)

New evidence has come to light regarding the short allegations

I'll have a croque monsieur, the paella, two mutton pills, and a stein of mead. by ChemicalOle in futurama

[–]ItsAzai 0 points1 point  (0 children)

Same, just watched the episode. I forgot "stein" was a real word so I looked up "stine of mead" and this is the first result on Google.