Skip to content

use log2() / log10() within basic log function #461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

marc-mabe
Copy link
Contributor

... to reduce rounding errors

see #337

This PR implements the use of log2 / log10 into PHP's log function:

log(x, 2) calls log2(x)
log(x, 10) calls log10(x)
log(x, y) calls log(x) / log(y) (as before)

Should the PHP function log10() be deprecated? Because log10(x) is the same as log(x, 10).

@@ -101,7 +101,7 @@
# elif SIZEOF_SHORT >= 2
typedef unsigned short uint16_t;
# else
# error "No suitable 16bit integer type found"
// # error "No suitable 16bit integer type found"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to this file seem unrelated. Are they accidental?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ow! This should not be committed - I revert it

@marc-mabe
Copy link
Contributor Author

@nikic reverted changes in main/stdint.h

@marc-mabe marc-mabe closed this Nov 10, 2013
@marc-mabe marc-mabe deleted the feature/log_improvement branch November 10, 2013 12:08
@marc-mabe marc-mabe restored the feature/log_improvement branch April 24, 2014 08:33
@marc-mabe marc-mabe deleted the feature/log_improvement branch October 24, 2014 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants