pcalau12i

joined 3 weeks ago
[–] pcalau12i@lemmygrad.ml 1 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

Zionazis believe Israel has developed a kind of bomb that if you drop it on a house full of people, the blast will wrap itself around all Israelis leaving them unaffected. The explosion is able to check people's citizenship status in real time to decide whether or not to incinerate them.

[–] pcalau12i@lemmygrad.ml 15 points 3 weeks ago* (last edited 3 weeks ago) (3 children)

Historically the US would go to war or even coup countries to force them to trade with the US, it has spent a very long time building up its dollar hegemony. If it suddenly switches to cutting off trade with its largest trading partners, that will basically disappear overnight. It is already disappearing gradually because of US's obsessive use of sanctions has created a whole bloc of countries that have no choice but to figure out how to bypass the US dollar. I wouldn't even consider the US threatening to cut trade ties all its largest trading partners as "bullying," it really reflects how much weaker the US has become, because in the past it would just use force to enforce its hegemony over global trade, now it seems too weak to it is just threatening to throw a temper tantrum and threatening to pull out of the global market instead, despite this being something that will ultimately cause whatever is left of US hegemony to collapse overnight. I would bet a lot of money the US would not actually do this, Trump is just bluffing, because I'm sure he's surrounded by people who actually do care about maintaining US control.

[–] pcalau12i@lemmygrad.ml 40 points 3 weeks ago (6 children)

What Trump doesn't seem to get is that the hegemony of the US dollar depends upon people, well, trading in US dollars. Sanctions and tariffs are the fastest way to kill US dollar hegemony, so honestly I'm all for it.

[–] pcalau12i@lemmygrad.ml 4 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

Finding Fibonacci numbers in C is easy, even when using recursion. Here is a program that can find the 1,000,000th Fibonacci number. It's too big to paste the output of the program here but here you can find it on pastebin here.

#include <stdio.h>
#include <gmp.h>

void fib(int idx, mpz_t *a, mpz_t *b, mpz_t *c)
{
	mpz_add(*c, *a, *b);
	mpz_set(*a, *b);
	mpz_set(*b, *c);
	if (idx < 0) return;
	fib(idx - 1, a, b, c);
}

int main()
{
	mpz_t a; mpz_init(a);
	mpz_t b; mpz_init(b);
	mpz_t c; mpz_init(c);
	mpz_set_str(a, "1", 10);
	mpz_set_str(b, "0", 10);

	fib(1000000, &a, &b, &c);
	mpz_out_str(stdout, 10, c);
	printf("\n");
	
	mpz_clear(a);
	mpz_clear(b);
	mpz_clear(c);
	return 0;
}

You need to compile with the -O2 flag in GCC. If your recursive call is at the end of the function, this is called tail recursion, and when using that flag, the GCC compiler is smart enough to not allocate more memory on the stack every time it does a recursive call, so you don't run out of memory.

view more: ‹ prev next ›