User bio
404 bio not found
Member since Nov 9, 2015
Posts:
Jose has not published any posts yet.
Replies:

Although your example is about integers, you know that any numerical algorithm that deals with roots and logarithms will have to work with floating point numbers. And when dealing with floating point numbers you have to accept that they are not exact representation of real numbers, so you are expected to work within some precision.

If you limit your precision to, say, 8 decimal places, you can get pretty good approximations.

USER>Set n=27,root=n**(1/3)

USER>Write $FN(root,"",8)
3.00000000

USER>Write +$FN(root,"",8)
3

I'd like to add a couple of comments about using systemd/systemctl with Caché.

First, if you have more than one instance on your machine, you might want to use ccontrol in the Caché systemd Unit to start/stop a particular instance. In that case you could name the file as cache-<instance name>.service.

The second point is that if you want to use systemctl to start/stop Caché, then you should always use it. Mixing systemctl with manual use of ccontrol is fine most of the time, but could cause unexpected results in some situations.

Consider the following sequence of events.

1) Caché is started by systemctl. If you ask for the instance status, systemctl will display a full process tree.

2) ccontrol stop <instance>

3) If you ask for systemctl status now, it will notice that the instance is inactive but will think it is dead.

4) ccontrol start <instance>

5) systemctl status cache-<instance> still reports that the service is inactive (dead) when in reality it is up and running.

So the takeaway point is that systemd can lose its status about Caché if you stop/start it manually with ccontrol or cstart/cstop.

In the above situation, if you inadvertently proceeded to shut down the OS without shutting down the Caché instance first, systemd would not invoke its ExecStop command because it would think the instance was already down.

Certifications & Credly badges:
Jose has no Certifications & Credly badges yet.
Global Masters badges:
Jose has no Global Masters badges yet.
Followers:
Jose has no followers yet.
Following:
Jose has not followed anybody yet.