Billy Logan - 1 year ago 186

Pascal Question

How can I write the following equation in Pascal?

Does it equal to

`pow(x, 2) / (pow(pow(16 - x*x, 1/2)), 3)`

Recommended for you: Get network issues from **WhatsUp Gold**. **Not end users.**

Answer Source

You don't mention the dialect, so I'll assume something still in active use like Lazarus/FPC/Delphi

Squared has a separate function sqr(), as does square root, sqrt(). For other values math.power is used (add math to your uses clause).

So that makes sqr(x)/power(sqrt(16-sqr(x)),3);

As a rule of thumb, the simplest expression gives the best precision.

Recommended from our users: **Dynamic Network Monitoring from WhatsUp Gold from IPSwitch**. ** Free Download**