Search:
Type: Posts; User: Strogian
Search:
Search took 0.03 seconds.
-
How about without an if statement?
-
Wow...you sure about that? All the time I've assumed that a switch statement used some sort of jump table array thing. (That was my reason why you couldn't do "real" tests in there, other than "is...
-
Oh, wow. I'd never thought of that. Hey, if you can do it, go ahead! :)
-
Well, I want functions that replace the ++ and >> operations, so naturally you shouldn't use ++ or >> in the function. :) (<< and -- are also no-good, but I don't think they'd help you anyway :))
-
Heh, that makes me think of one.. Come up with bitwise-shift and increment (or decrement) functions, using only the bitwise operations. (that doesn't include >> :))
-
You have no idea how much pain this problem gave me. :D
x = (a+b)(c+d)
y = ac
z = bd
Answer = y-z + (x-y-z)i
-
And here's the addition one: (I assumed unsigned numbers, but negatives are designed to work seamlessly with an adder, right?)
int fastadd(unsigned int a, unsigned int b)
{
int tmpa;
...
-
Ooh! Ooh! I got it! :D
Well, here's what I got. From here, the program is probably simple. :)
ax^2+bx+c -> x(ax+b) + c
ax^3+bx^2+cx+d -> x(x(ax+b) + c) + d
...and so on...
-
I could do it if there weren't any coefficients, does that count? :p
-
What's a real multiplication? Can I use division? :D
EDIT: Oh, I'm close. I know it. ;)
EDIT: Ah nevermind, I got nothing. :D
|
|