How would you write ∀ y ∈ R +, ∃ z ∈ R, e ^ z = y in pseudocode?

I read about the evidence currently reading Mathematics for Computer Science by Eric Lehman and Tom Leighton, they illustrate in a sample sentence that "since z runs over real numbers, e ^ z takes every positive, real value at least once." I am having trouble fully understanding this sentence.

I am trying to approach this as a programmer and think about how it will look in pseudo-code if I see if it was true.

pr = [ all real positive numbers ]
r  = [ all real numbers ]

for y in pr:
    for z in r:

        e = pow(y, z)
        if e != y:
            goto outer

        print "this is true";

    outer

Is that what they offer?

+4
source share
3 answers

∀ y ∈ R +, ∃ z ∈ R, e ^ z = y

, y z , exp(z) = y.

, , . - , .

( , ),

  • , z, , exp(z) = y, z , exp(z) = y
  • z y, exp(z) = y y R + z R.

, , , , , .

Edit: :

R = [SET OF ALL REALS]
R+ = FILTER (> 0) R
(MAP (exp) R) == R+

N.B. exp e^n, e^x = SUM [ (x^k)/(k!) | k <- [SET OF ALL NATURALS]], 2.718^x.

+3

, , , , , :

pr = [ all real positive numbers ]
r  = [ all real numbers ]

for y in pr:
    for z in r:
        e = exp(z)
        if e == y:
            goto outer

    print "false"
    stop

    outer:

print "true"

:

  • () pow(y, z) exp(z). z , , e, z th

  • ( ) ,

  • (, y ), . . y .

, , , , . , , , e^z = y, z = log(y).

+2

The proposition is proved by a program that finds z ∈ R for any y ∈ R +, therefore:

z = log(y);
0
source

Source: https://habr.com/ru/post/1665535/


All Articles