Dummy Math Questions
-
hello, i'm trying to cope with a couple of math calculations i need to do within my c# application. i've got two problems: first, i have difficulties translating the vocabulary to english and second, i don't know how to code it in c#. two things i require: 1. how do I get the root of n? 2. how do I calculate the reciprocal of a number? and what is the reciprocal anyway? and yes, i've been to school. but this is a long time ago. thanks for your help!
/matthias
I love deadlines. I like the whooshing sound they make as they fly by.
[Douglas Adams]matthias s. wrote:
how do I get the root of n?
You can use Math.Pow method
matthias s. wrote:
how do I calculate the reciprocal of a number?
matthias s. wrote:
and what is the reciprocal anyway?
Well I believe first you have to find out what reciprocal is and then start coding it. So why don;t you google?
-
matthias s. wrote:
how do I get the root of n?
You can use Math.Pow method
matthias s. wrote:
how do I calculate the reciprocal of a number?
matthias s. wrote:
and what is the reciprocal anyway?
Well I believe first you have to find out what reciprocal is and then start coding it. So why don;t you google?
thanks for your help on the first part. ad google: i did. but still, i don't understand what i've found. the explanations are cluttered with different approaches on how to deal with reciprocal - this is why i asked. to clear things up a little, I'd like to mention, that I'm trying to do what is written here: "To convert this value to ordinary 'Shutter Speed'; calculate this value's power of 2, then reciprocal." i'm just in need of a simple answer of somebody, who shares a household with reciprocal and c# ;)
/matthias
I love deadlines. I like the whooshing sound they make as they fly by.
[Douglas Adams] -
thanks for your help on the first part. ad google: i did. but still, i don't understand what i've found. the explanations are cluttered with different approaches on how to deal with reciprocal - this is why i asked. to clear things up a little, I'd like to mention, that I'm trying to do what is written here: "To convert this value to ordinary 'Shutter Speed'; calculate this value's power of 2, then reciprocal." i'm just in need of a simple answer of somebody, who shares a household with reciprocal and c# ;)
/matthias
I love deadlines. I like the whooshing sound they make as they fly by.
[Douglas Adams]Here is the definition of reciprocal: http://www.mathleague.com/help/fractions/fractions.htm#reciprocal
-
thanks for your help on the first part. ad google: i did. but still, i don't understand what i've found. the explanations are cluttered with different approaches on how to deal with reciprocal - this is why i asked. to clear things up a little, I'd like to mention, that I'm trying to do what is written here: "To convert this value to ordinary 'Shutter Speed'; calculate this value's power of 2, then reciprocal." i'm just in need of a simple answer of somebody, who shares a household with reciprocal and c# ;)
/matthias
I love deadlines. I like the whooshing sound they make as they fly by.
[Douglas Adams]http://en.wikipedia.org/wiki/Reciprocal\_(mathematics) 1/X so you would take the shutter speed, square it, then divide 1 by it.
-
thanks for your help on the first part. ad google: i did. but still, i don't understand what i've found. the explanations are cluttered with different approaches on how to deal with reciprocal - this is why i asked. to clear things up a little, I'd like to mention, that I'm trying to do what is written here: "To convert this value to ordinary 'Shutter Speed'; calculate this value's power of 2, then reciprocal." i'm just in need of a simple answer of somebody, who shares a household with reciprocal and c# ;)
/matthias
I love deadlines. I like the whooshing sound they make as they fly by.
[Douglas Adams]For
reciprocal
see here [^]. And of course you don't needPow
to take the square of a number, just multiply it by itself. Perhaps what you need is:ShutterSpeed = 1.0/(OriginalValue*OriginalValue);
Please note that some care must be taken when
OriginalValue
approaches zero... :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
-
For
reciprocal
see here [^]. And of course you don't needPow
to take the square of a number, just multiply it by itself. Perhaps what you need is:ShutterSpeed = 1.0/(OriginalValue*OriginalValue);
Please note that some care must be taken when
OriginalValue
approaches zero... :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
-
For
reciprocal
see here [^]. And of course you don't needPow
to take the square of a number, just multiply it by itself. Perhaps what you need is:ShutterSpeed = 1.0/(OriginalValue*OriginalValue);
Please note that some care must be taken when
OriginalValue
approaches zero... :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
CPallini wrote:
And of course you don't need Pow to take the square of a number, just multiply it by itself.
I thought he meant n-th root from number :)
-
StevenBee wrote:
if (OriginalValue != 0) { }
Maybe you still got a divide by zero exception! :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
-
For
reciprocal
see here [^]. And of course you don't needPow
to take the square of a number, just multiply it by itself. Perhaps what you need is:ShutterSpeed = 1.0/(OriginalValue*OriginalValue);
Please note that some care must be taken when
OriginalValue
approaches zero... :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
thanks a lot. i'll try that tonight.
/matthias
I love deadlines. I like the whooshing sound they make as they fly by.
[Douglas Adams] -
thanks a lot. i'll try that tonight.
/matthias
I love deadlines. I like the whooshing sound they make as they fly by.
[Douglas Adams]