Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Numerical Stability

Name: Anonymous 2007-11-13 22:18

This issue came up at work today, I thought ya /prog/ peeps might have some info.

So what do ya'll know about the numerical stability of rotations with, matrices, euler angles, and quaterions.

Also what do you know about the methods for interpolating rotations, and which method maintains numerical stability across the interpolation operation.

Name: Anonymous 2007-11-13 22:57

Here's an example of the problem

I have an array of vectors in coord system 1
and an array of matrices to rotate vectors in system 2 into system 3

I can either
(1) transform vectors to system 2 and then use interpolated original matrices or
(2) transform rotation matrices to do rotations from system 1 -> system 3, then interpolate
them and use to rotate unchanged data vectors.

It was stated that if I interpolate using euler rotations the result from (1) will be different from the result in (2)

Name: Anonymous 2007-11-13 22:59

lol, /prog/'s a bunch of nublets who think reading sicp is an accomplishment.

Name: Anonymous 2007-11-13 23:04

Just use system 3 in the first place.  Problem fucking solved.  GTFO.

Name: Anonymous 2007-11-14 0:00

>>4
I'm sometimes at a loss for words to describe the retardation of some of the people that post on this board.

Name: Anonymous 2007-11-14 0:24

wtf is numerical stability

Name: Anonymous 2007-11-14 0:38

>>6
Certain algorithms are numerically unstable.  It happens most often as a result of accumulated rounding error in floating point arithmatic.  It is important to identify algorithms that do not accumulate that error.

I believe the example above is a case of one of these algorithms, quaternion interpolation does not accumulate this error while euler rotation interpolation does, and I'd like to know why....but I'm starting to think peeps on this board don't have the skills to answer a question like this.

Name: Anonymous 2007-11-14 1:25

>>7
all algorithms involving either extremes of floating point would be numerically unstable then

it may be because one uses values which a binary floating point system can represent hence no round off errors, using numbers such as 0.5, 0.25... and their combinations

Name: Anonymous 2007-11-14 1:27

>>7
after a bit of googling, I conclude that you're just pasting bullshit to make yourself look smart since numerical stability has nothing to do with binary floating point representation

hence GTFO

Name: Anonymous 2007-11-14 1:30

>>9
disregard that, I write Java

Name: Anonymous 2007-11-14 2:12

>>9
I guess you missed wikipedia...
but seriously if you don't want to look like a jackass, take a class on linear algebra or read at least read a book, cause right now you sound like an ignant troll

Name: Anonymous 2007-11-14 2:16

>>8 a lot of algorithms exhibit numerical instability in computers, some more than others, its a problem that is often overlooked by programmers to their detriment, but numerical instability is a question of degree, some algorithms are much more unstable than others.

Name: Anonymous 2007-11-14 2:57

I was hoping there was some smart channer out there that could help me understand this quaternion problem but I see this is gonna have to end up being a tutorial for you braindead zombies.

A good example of numerical stability issues shows up in matrix inversion. When you calculate the inverse of a matrix the naive method, that those of us that made it out of remedial math classes in highschool learned was gaussian elimination.  In this algorithm you use multiples of the ith row of an mxn matrix to reduce the leftmost non-zero coeeficient of rows i+1 to m of the matrix to 0.  The problem that arises is that floating point representations in computers end up having little non-zero components floating off in the least significant digits(ie a result of a multiplication ends up 1.0000004 instead of 0.0000000)  To reduce these little fuckers to 0 requires ever more complex and esoteric row multipliers as the algorithm continues, to the point where this simple algorithm ends up essentially intractable on modern computers for matrices of reasonably large dimensions(>10x10).
Each step in this algorithm compounds this error because the multipliers used in previous steps to get the coefficient exactly to zero are not independent of subsequent steps.

So since gaussian elimination is numerically unstable most matrix inversion packages try to use other more complex methods of calculating the matrix inverse.

Name: Anonymous 2007-11-14 4:34

That's a problem with binary logic. We should build computers that does denary logic.

Name: Anonymous 2007-11-14 5:05

Have you tried using infinite precision decimals? Admittedly, it's slower but is as accurate as you require.

You might find this interesting: http://www.haskell.org/haskellwiki/Exact_real_arithmetic

Name: Anonymous 2007-11-14 5:16

>>11
Wikipedia for reference? LULZ.

"but seriously if you don't want to look like a jackass, take a class on linear algebra or read at least read a book, cause right now you sound like an ignant troll"

Back to school faggot, and maybe take that English class that you missed back in fifth grade about proper punctuation and spelling.

Also, this is /prog/, not /math/, GTFO, trolled.

>>12
These algorithms are also more related to mathematics and computer science rather than programming since programming has real world constraints and the other two does not aside from their respective laws.

>>13
The OP question can be answered with two sentences:

Stop trying to sound smart, dumbass. Ask a stupid question, get a stupid answer.

This entire thread consists of subtle bitching about the FACT that floating point numbers in computers cannot represent exact values, FOR FUCKS SAKE that problem was identified when floating point numbers were first introduced.

For matrix inversion, make a Fraction class with integers to avoid float round off errors or use higher precision floats, but make sure the answer is round off at a point less than the precision limit.

Also the adjoint matrix can be used to find inverse if I remember correctly, adjoint matrix involves determinants so there is no floating round off error unless the original matrix consists of real non-rational numbers, in that case, you can't do anything about it since it is a limitation on behalf of the machine. Although using the adjoint matrix is still far more preferable to Gauss-Jordan reduction for smaller matrices.

Name: Anonymous 2007-11-14 5:36

It's maths.

Name: Anonymous 2007-11-14 11:15

GRAPHICS IS THE HEIGHT OF PROGRAMMING

Name: Anonymous 2007-11-14 14:15

IF YOU FUCKING JUST PLOT YOUR SHIT IN COORD SYSTEM 3 YOU DON'T HAVE TO INTERPOLATE SHIT

GTFO YOU FUCKING ASSHOLE COCKSUCKER.  DURRR I'M A MATH WHIZ AND I BROWSE 4VIRGINCHAN YEAH FUCKING RIGHT!!!  GTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFOGTFO
MATRIXFGT

Name: Anonymous 2007-11-14 22:11

>>16 #1 I'm not gonna waste time writing a fucking essay for people whose intelligence quotients are floating somewhere between vegatable and mineral

>>16 #2 Computer science and math are two sides of the same coin, especially these types of questions.  If you want to be good at one and do advanced things in one, you better damn well be able to understand and work well in the other.

>>16 #3 Of course its been identified thats why people study numerical stability, but if you think its trivial or simple you are more retarded than I suspect.  Some algorithms are susceptable to rounding error and some aren't, op's original question was why a particular algorithm is.

As for fraction classes, that would be fucking fine if I was writing a fucking calculator for my jr. highschool cs class, but in the situation I'm in I've double precision floats from real instruments that are processed by an A->D fpga.  Moreover, try to solve these algorithms with when using an internal fraction representation turns calculations into search problems, essentially killing performance. QED fraction library is fucking idiotic.

Wrt matrix adjoint, that technique only works on small matrices, its essentially just applying the matrix inverse formula to a 2,3,4 dimensional matrix, its very similiar to the quadratic formula in that closed forms for higher order problems are nigh impossible to find much less solve.  That said there a million fucking ways to invert a matrix, the point is, some are stable and some aren't.

That said it was a fucking example, so I could really give less of a fuck how you chose to invert matrices.

>>18 this isn't a graphics application, its a physics application

>>19 you really have no fucking clue what a vector space or a coordinate system is do you?  You can't plot vectors in one system in another system unless you rotate those vectors into the system you are plotting in.  Thats not a claim or opinion, its a fact.

The bottom line is, that good programmers are virtuosos in math as well as computer science, because they understand the two fields are very closely interconnected.

But I made a mistake in thinking there were some talented people lurking on this board.  I shudder to discover that no one on this board knows shit, although now that I know it, in retrospect I'm unsurprised.

So I get it ya'll are beginning coders at best, who get threatened when someone asks a challenging question, it's chill, I have no problem taking my question elsewhere.

C ya dumb fucks lata.

Name: Anonymous 2007-11-14 22:54

not all programming is about math. if you're writing a physics, sure, it will be.

Name: Anonymous 2007-11-14 23:06

All programming logic transforms into mathematical logic. Therefore programming is all about math.

Name: Anonymous 2007-11-14 23:29

>>22
It runs both ways, all math is about algorithms the logic of computer science.  It'd be more accurate to say there is a natural isomorphism between the two fields than to say one is a subset of the other.

Name: Anonymous 2007-11-14 23:55

>>20
Haha, stupid fag got pissed off.

#1. IQ is not a valid measure of intelligence. Enjoy your mensa medals while real intelligent people make the discoveries.

#2. WRONG, they both have some common points but they do differ, for one, comp.sci also includes study of computation limitation and real world limitation as applied in machines.

#3. It is trivial. Point me to a algorithm which returns an answer that involves actual floating point calculation and I can make it spew out the incorrect answer.

People study numerical methods because of floating point inprecision? You fucking kidding me. Obviously bad Fraction class implementation is obviously bad.

List all million way to invert the matrix, if you want to keep asking stupid questions and give half-assed rebuttal without valid proof then I would too.

You obviously don't understand real world implementations, ever wonder why x87 and other high precision floats (GO AWAY C# and your faggotry decimal type) is listed as 64 bit but uses a 80 bit register? You're fucking retarded, anything involving floats will be inaccurate unless the number exist in a subset of the binary system 1/2^n.

Smart troll, neithertheless has the intelligence of a dead fish.

"Ya'll" is not the right way to use punctuation, "Y'all" is the accepted form. Take some english before coming here after reading some wiki and thinking you're the next Einstein. And enjoy your checkout job.

Name: Anonymous 2007-11-14 23:59

>>24
Footnote: Matrix inversion isn't a formula.

Name: Anonymous 2007-11-15 0:07

SOLUTION: Use Tensor Calculus Libraries.

Name: Anonymous 2007-11-15 0:42

Wow stupidity is rampant here. Floating point numbers are real numbers but they can't represent all real numbers, they have huge inherent imprecision. We cannot represent with full accuracy an irrational number on the computer, the only numbers we can actually represent with full accuracy are a subset of the rational numbers.

There is no bijection between Math and CS, they just collide.

It's a waste of time explaining the obvious to /prog/

Name: Anonymous 2007-11-15 1:26

>>27
THANK YOU.

Try tell that to OP and >>20 who tends to bitch about it.

Name: Anonymous 2007-11-15 2:22

ONE WORD, FORCED STABILITY OF NUMERICS, THREAD OVER

Name: Anonymous 2007-11-15 4:42

>>27
We cannot represent with full accuracy an irrational number on the computer
WTF

I can represent an irrational number, such as "sqrt(5)", in many ways, and write functions to operate with it. There are many programs who work with irrational numbers without using floating point.

Name: Anonymous 2007-11-15 4:58

>>30
He spoke in terms of floats, learn to read dipshit.

Name: Anonymous 2007-11-15 5:21

This is basic computer science. Go back to school.

Name: Anonymous 2007-11-15 6:19

>>31
I knew what he meant, I was just being an ass to get you angry

Name: Anonymous 2007-11-15 6:33

>>33
Yeah guys, you all fell into my internet trap! Go me!

Name: Anonymous 2007-11-15 23:13

Name: Anonymous 2007-11-16 0:14

>>31

 OMG I CAN FEEL EMOTIONS THROUGH THE NET TUBES

Name: Anonymous 2007-11-16 0:42

CS student here.

dw OP, all the people here are about 17 years old and don't know much beyond their high school "programming" course and the groupthink that takes place on this board regarding java, C (OMG OPTIMIZED), etc.

Name: Anonymous 2007-11-16 0:49

CS enthusiast here.

CS students are generally fags with no real grasp on programming. Take what they say with a grain of salt.

Name: Anonymous 2007-11-16 0:54

>>38
butthurt 17 year old

Name: Anonymous 2007-11-16 1:04

>>38

because programming is all we study in our first year amirite?

Name: Anonymous 2007-11-16 1:05

>>39,40

Butthurt EXPERT PROGRAMMERS

Name: Anonymous 2007-11-16 1:06

>>38,41

SAME FAGGOT

Name: Anonymous 2007-11-16 1:19

>>42

Wrong

Name: Anonymous 2007-11-16 1:23

>>41,43
SAME FAGGOT
>>38,44
SAME FAGGOT

Name: Anonymous 2007-11-16 1:37

>>44

Correct

Name: Anonymous 2007-11-16 2:11

>>37
butthurt CS student

your degree aint worth shit in the real world, enjoy writing Java and PHP for the rest of your life

Name: Anonymous 2007-11-16 4:08

This thread is hilarious

Name: Anonymous 2007-11-16 4:11

>>47

Butthurt unfunnyfag

Name: Anonymous 2007-11-16 4:12

>>46
butthurt 15 year old "programmer"

what would you know about what is worthy and what isn't?

go write some visual basic.

Name: Anonymous 2007-11-16 5:02

A few people gave you useful advice but you chose to ignore it and have a rant instead. Enjoy your fail.

Name: Anonymous 2007-11-16 18:17

If you have a lot of vectors to rotate, it would be best to just get a single transformation matrix.  You can probably save a bit of time in the calculations since the determinant of a rotational transform matrix ought to always be 1.

Name: Anonymous 2007-11-16 18:25

niggers + 1 - 1 niggers niggers niggers ? niggers niggers EXPERT PROGRAMMER niggers niggers niggers niggers niggers java niggers niggers niggers niggers SICP abelson niggers niggers niggers niggers niggers niggers.

LOOK ITS THE BREAKDOWN OF EVERY CONVERSATION ON THIS BOARD.

Name: Anonymous 2007-11-17 1:16

CS Student Here.

I doesn't need ur help. I got a Mack!
I noez Applescripp.

Name: Anonymous 2007-11-17 2:49

>>49
butthurt failure

Even my Visual Basic ENTERPRISE management console application are better than what you could code, also faster to develop too.

Name: Anonymous 2007-11-17 20:44

**JUST** **FUCKING** **EXPRESS** **ALL** **DATA** **IN** **TERMS** **OF** **COORD SYSTEM 3** **TO** **FUCKING** ****START WITH****

**NO CONVERSION EVEN FUCKING NEEDED**
GODFUCKINGDAMN

Name: Anonymous 2007-11-18 14:53

>>55
**YOU** **FUQIN*******ANGERERD**AN**EXPERT**PROGRAMMER******

Name: Anonymous 2007-11-18 16:55

#   #
  # #
#######
  # #
 #   #

 #   #
  # #
#######
  # #
 #   #

 #   #
  # #
#######
  # #
 #   #

Name: Anonymous 2007-11-23 16:35

>>26
>>55

FUCKING DONE.

Name: Anonymous 2011-11-10 11:30

old thread is old

Name: Anonymous 2011-11-10 11:30

old thread is old

Name: Anonymous 2013-01-19 23:19

/prog/ will be spammed continuously until further notice. we apologize for any inconvenience this may cause.

Don't change these.
Name: Email:
Entire Thread Thread List