|
Science Forum Index » Cryptography Forum » Simple math question
Page 1 of 1
|
| Author |
Message |
| Tom St Denis |
Posted: Sat Jan 03, 2004 12:43 am |
|
|
|
Guest
|
I'm writing the pb_exptmod section of the ltp manual [modular
exponentiation]. Is it correct to say
Y(x) \equiv G(x)^X mod P(x)
or is it
Y(x) \equiv G^X(x) mod P(x)
?
From what I recall of high school calculus is that numbers before the (x)
means n'th derivative. Right? So the former is right for exponentiation?
Tom
N.B. During the course of basically ripping off the LTM exptmod [since the
function names are too similar ] I noticed a bug in the LTM exptmod.
There is a minor memory leak [on error] where it doesn't free one integer.
I've fixed that [will be in v0.29]. Just a heads up. |
|
|
| Back to top |
|
| Colin Andrew Percival |
Posted: Sat Jan 03, 2004 12:43 am |
|
|
|
Guest
|
Paul Rubin <http://phr.cx@nospam.invalid> wrote:
Quote: It's customary to write things like "sin^2(x) + cos^2(x) = 1"
or "the running time is O(N log^2(N))"
Depends upon the field. Some people write log^2(n) to mean log log n.
Others write log_2 n, which I think is even more confusing.
Colin Percival |
|
|
| Back to top |
|
| Colin Andrew Percival |
Posted: Sat Jan 03, 2004 12:43 am |
|
|
|
Guest
|
Paul Rubin <http://phr.cx@nospam.invalid> wrote:
Quote: It's customary to write things like "sin^2(x) + cos^2(x) = 1"
or "the running time is O(N log^2(N))"
Depends upon the field. Some people write log^2(n) to mean log log n.
Others write log_2 n, which I think is even more confusing.
Colin Percival |
|
|
| Back to top |
|
| Paul Rubin |
Posted: Sat Jan 03, 2004 12:48 am |
|
|
|
Guest
|
"Tom St Denis" <tomstdenis@iahu.ca> writes:
Quote: Y(x) \equiv G(x)^X mod P(x)
or is it
Y(x) \equiv G^X(x) mod P(x)
?
From what I recall of high school calculus is that numbers before the (x)
means n'th derivative. Right? So the former is right for exponentiation?
It's customary to write things like "sin^2(x) + cos^2(x) = 1"
or "the running time is O(N log^2(N))". But for other kinds of
functions I'd say it's more clear to write it the first way. |
|
|
| Back to top |
|
| Paul Rubin |
Posted: Sat Jan 03, 2004 12:48 am |
|
|
|
Guest
|
"Tom St Denis" <tomstdenis@iahu.ca> writes:
Quote: Y(x) \equiv G(x)^X mod P(x)
or is it
Y(x) \equiv G^X(x) mod P(x)
?
From what I recall of high school calculus is that numbers before the (x)
means n'th derivative. Right? So the former is right for exponentiation?
It's customary to write things like "sin^2(x) + cos^2(x) = 1"
or "the running time is O(N log^2(N))". But for other kinds of
functions I'd say it's more clear to write it the first way. |
|
|
| Back to top |
|
| Tom St Denis |
Posted: Sat Jan 03, 2004 12:50 am |
|
|
|
Guest
|
"Paul Rubin" <http://phr.cx@NOSPAM.invalid> wrote in message
news:7xr7yh1t1q.fsf@ruckus.brouhaha.com...
Quote: "Tom St Denis" <tomstdenis@iahu.ca> writes:
Y(x) \equiv G(x)^X mod P(x)
or is it
Y(x) \equiv G^X(x) mod P(x)
?
From what I recall of high school calculus is that numbers before the
(x)
means n'th derivative. Right? So the former is right for
exponentiation?
It's customary to write things like "sin^2(x) + cos^2(x) = 1"
or "the running time is O(N log^2(N))". But for other kinds of
functions I'd say it's more clear to write it the first way.
Hmm, I guess people will figure out what it means [not likely that people
not into math will look at ltp anyways ]
Thanks,
Tom |
|
|
| Back to top |
|
| Tom St Denis |
Posted: Sat Jan 03, 2004 12:50 am |
|
|
|
Guest
|
"Paul Rubin" <http://phr.cx@NOSPAM.invalid> wrote in message
news:7xr7yh1t1q.fsf@ruckus.brouhaha.com...
Quote: "Tom St Denis" <tomstdenis@iahu.ca> writes:
Y(x) \equiv G(x)^X mod P(x)
or is it
Y(x) \equiv G^X(x) mod P(x)
?
From what I recall of high school calculus is that numbers before the
(x)
means n'th derivative. Right? So the former is right for
exponentiation?
It's customary to write things like "sin^2(x) + cos^2(x) = 1"
or "the running time is O(N log^2(N))". But for other kinds of
functions I'd say it's more clear to write it the first way.
Hmm, I guess people will figure out what it means [not likely that people
not into math will look at ltp anyways ]
Thanks,
Tom |
|
|
| Back to top |
|
| Henrick Hellström |
Posted: Sat Jan 03, 2004 6:55 am |
|
|
|
Guest
|
Colin Andrew Percival wrote:
Quote: Paul Rubin <http://phr.cx@nospam.invalid> wrote:
It's customary to write things like "sin^2(x) + cos^2(x) = 1"
or "the running time is O(N log^2(N))"
Depends upon the field. Some people write log^2(n) to mean log log n.
Others write log_2 n, which I think is even more confusing.
Colin Percival
Yes, sin^2 etc are special cases. This is the notation I learned for
general functions, here applied to the log function:
Iteration:
log^2(x) = log(log(x))
Square:
log(x)^2 = log(x)*log(x)
2nd derivate:
log^(2)(x) = log"(2) = -1/(x^2)
Base 2 log:
log_2(x) = log(x)/log(2) |
|
|
| Back to top |
|
| Henrick Hellström |
Posted: Sat Jan 03, 2004 6:55 am |
|
|
|
Guest
|
Colin Andrew Percival wrote:
Quote: Paul Rubin <http://phr.cx@nospam.invalid> wrote:
It's customary to write things like "sin^2(x) + cos^2(x) = 1"
or "the running time is O(N log^2(N))"
Depends upon the field. Some people write log^2(n) to mean log log n.
Others write log_2 n, which I think is even more confusing.
Colin Percival
Yes, sin^2 etc are special cases. This is the notation I learned for
general functions, here applied to the log function:
Iteration:
log^2(x) = log(log(x))
Square:
log(x)^2 = log(x)*log(x)
2nd derivate:
log^(2)(x) = log"(2) = -1/(x^2)
Base 2 log:
log_2(x) = log(x)/log(2) |
|
|
| Back to top |
|
| John Savard |
Posted: Sat Jan 03, 2004 8:40 am |
|
|
|
Guest
|
On Sat, 03 Jan 2004 05:50:12 GMT, "Tom St Denis" <tomstdenis@iahu.ca>
wrote, in part:
Quote: "Paul Rubin" <http://phr.cx@NOSPAM.invalid> wrote in message
news:7xr7yh1t1q.fsf@ruckus.brouhaha.com...
"Tom St Denis" <tomstdenis@iahu.ca> writes:
Y(x) \equiv G(x)^X mod P(x)
or is it
Y(x) \equiv G^X(x) mod P(x)
?
From what I recall of high school calculus is that numbers before the
(x)
means n'th derivative. Right? So the former is right for
exponentiation?
It's customary to write things like "sin^2(x) + cos^2(x) = 1"
or "the running time is O(N log^2(N))". But for other kinds of
functions I'd say it's more clear to write it the first way.
Hmm, I guess people will figure out what it means [not likely that people
not into math will look at ltp anyways  ]
Until I read Paul Rubin's answer, I didn't understand what your
question was. But now that I understand it, I have an answer.
"log^2(N)" is really written log<sub>2</sub> N in mathematical
notation if what is intended is the logarithm of N to the base 2.
The trignometric case is a very old notation, resulting from the
common use of the squares of trig functions in many identities, and is
an exception to the normal rule. The *normal* rule is the one that
says sin^-1(x) is the arc sine of (x), because numbers before the x
operate on the function itself, not the value of the function... and
composition of functions is the operation corresponding to
multiplication for functions.
Thus, f''(x) is the second derivative of f with respect to x evaluated
at x, but f^2(x) is f(f(x)) in normal mathematical notation. Because
of the case of trig functions, though, it can't be relied upon as
always meaning that - context, and definitions in any given paper, are
required to properly interpret powers applied to functions.
John Savard
http://home.ecn.ab.ca/~jsavard/index.html |
|
|
| Back to top |
|
| John Savard |
Posted: Sat Jan 03, 2004 8:40 am |
|
|
|
Guest
|
On Sat, 03 Jan 2004 05:50:12 GMT, "Tom St Denis" <tomstdenis@iahu.ca>
wrote, in part:
Quote: "Paul Rubin" <http://phr.cx@NOSPAM.invalid> wrote in message
news:7xr7yh1t1q.fsf@ruckus.brouhaha.com...
"Tom St Denis" <tomstdenis@iahu.ca> writes:
Y(x) \equiv G(x)^X mod P(x)
or is it
Y(x) \equiv G^X(x) mod P(x)
?
From what I recall of high school calculus is that numbers before the
(x)
means n'th derivative. Right? So the former is right for
exponentiation?
It's customary to write things like "sin^2(x) + cos^2(x) = 1"
or "the running time is O(N log^2(N))". But for other kinds of
functions I'd say it's more clear to write it the first way.
Hmm, I guess people will figure out what it means [not likely that people
not into math will look at ltp anyways  ]
Until I read Paul Rubin's answer, I didn't understand what your
question was. But now that I understand it, I have an answer.
"log^2(N)" is really written log<sub>2</sub> N in mathematical
notation if what is intended is the logarithm of N to the base 2.
The trignometric case is a very old notation, resulting from the
common use of the squares of trig functions in many identities, and is
an exception to the normal rule. The *normal* rule is the one that
says sin^-1(x) is the arc sine of (x), because numbers before the x
operate on the function itself, not the value of the function... and
composition of functions is the operation corresponding to
multiplication for functions.
Thus, f''(x) is the second derivative of f with respect to x evaluated
at x, but f^2(x) is f(f(x)) in normal mathematical notation. Because
of the case of trig functions, though, it can't be relied upon as
always meaning that - context, and definitions in any given paper, are
required to properly interpret powers applied to functions.
John Savard
http://home.ecn.ab.ca/~jsavard/index.html |
|
|
| Back to top |
|
| |