H
H
hippi122019-02-25 20:42:19
Delphi
hippi12, 2019-02-25 20:42:19

Need help with delphi who can help?

Can you help translate this into Delphi, or help me find the error
m:= (x*exp(abc(yx))+sqr(x)*y)/(z*sqrt(x+2*y)-0.5*x)
n:=(exp(3*ln(x))*ln(z)+2*sqr(y)*z/exp(1/3*ln(abc(xz)+abc(yx)+sqr(x) *z;
5c742831c7aa5104367061.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
kalapanga, 2019-02-26
@kalapanga

1) Taking the absolute value not "abc" but "abs"
2) In the expression for m, the exponent of the wrong number is taken. In the program yx in the formula yz
3) Check the brackets. In the expression for n there are several more left parentheses than right ones.
4) In Delphi, for raising positive numbers to a power, there is a function power. For the root of the third degree, it can be applied, because Under the root you always have a positive number. It will be more readable. And x in a cube, I would also write without exponential / logarithms: x * x * x. This is both shorter and faster, and the result is generally more accurate.
5) For the future. The question should indicate what kind of error it is.
a) Compilation error
b) Run-time error (program crashes while running)
c) Everything works, but the result is different than expected
Each case will require its own additional information

V
Vitsliputsli, 2019-02-25
@Vitsliputsli

In my opinion like this:

n:=((x^3)*ln(z)+2*sqr(y)*z)/((abc(x-z)+abc(y-x))^(1/3)+sqr(x)*z)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question