Skip to content
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

refactor: replaces the math functions with float based function from the standard namespace #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/backend/utils/adt/array_selfuncs.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ mcelem_array_contained_selec(Datum *mcelem, int nmcelem,
* of a column value having zero occurrences of such elements. See above
* for the definition of "rest".
*/
mult *= exp(-rest);
mult *= expf(-rest);

/*----------
* Using the distinct element count histogram requires
Expand Down Expand Up @@ -1065,7 +1065,7 @@ calc_distr(const float *p, int n, int m, float rest)
row[i] = 0.0f;

/* Value of Poisson distribution for 0 occurrences */
t = exp(-rest);
t = expf(-rest);

/*
* Calculate convolution of previously computed distribution and the
Expand Down
2 changes: 1 addition & 1 deletion src/backend/utils/adt/tsrank.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ calc_rank_and(const float *w, TSVector t, TSQuery q)

if (!dist)
dist = MAXENTRYPOS;
curw = sqrt(wpos(post[l]) * wpos(ct[p]) * word_distance(dist));
curw = sqrtf(wpos(post[l]) * wpos(ct[p]) * word_distance(dist));
res = (res < 0) ? curw : 1.0 - (1.0 - res) * (1.0 - curw);
}
}
Expand Down