Skip to content

Commit

Permalink
Fixed long double unary func problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
teoliphant committed Oct 11, 2005
1 parent 7f1961c commit 9edde60
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions scipy/base/src/ufuncobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ PyUFunc_OO_O(char **args, intp *dimensions, intp *steps, void *func)


typedef double DoubleUnaryFunc(double x);
typedef double FloatUnaryFunc(float x);
typedef double LongdoubleUnaryFunc(longdouble x);
typedef float FloatUnaryFunc(float x);
typedef longdouble LongdoubleUnaryFunc(longdouble x);
typedef void CdoubleUnaryFunc(cdouble *x, cdouble *res);
typedef void CfloatUnaryFunc(cfloat *x, cfloat *res);
typedef void ClongdoubleUnaryFunc(clongdouble *x, clongdouble *res);
Expand Down Expand Up @@ -231,8 +231,7 @@ PyUFunc_g_g(char **args, intp *dimensions, intp *steps, void *func)
fprintf(stderr, "expl = %p, sqrtl = %p\n", expl, sqrtl);
fprintf(stderr, "Called %p with %Lf: ",
func, *(longdouble *)ip1);
*(longdouble *)op = ((LongdoubleUnaryFunc *)func) \
(*(longdouble *)ip1);
*(longdouble *)op = ((LongdoubleUnaryFunc *)func)(*(longdouble *)ip1);
fprintf(stderr, "Answer was %Lf.\n",
*(longdouble *)op);
}
Expand Down

0 comments on commit 9edde60

Please sign in to comment.