You are viewing a single comment's thread from:

RE: C++ program of (a) power (b) without using builtin function

in #programming7 years ago

I thought I was pretty clear about my intention in my previous post but clearly you took offense.

I never sought to defend the post that you were correcting. If anything I said that was a good thing.

But clearly I thought that if you are going to provide corrections you need to be accurate.
I pointed at a mistake in your code. No need to be so sensitive. We all make mistakes.

As for the overflow I don't pretend to know the most efficient way to check for it but if your intention was to show an example implementation of pow, a quick check on the man page would show you that the library call would set errno to ERANGE in this scenario.

Anyway I certainly don't carry any hard feeling and this will be my last comment in this matter.

Wishing you all the best.

Sort:  
Loading...