Since the library of standard mathematical functions doesn't support double precision, I decided to write my own function to perform an exponential. In doing so I get this error:

ERROR: Expected a object of type 'struct'

While processing <buffer>:103

In compiler at GetSubpart()[astsymbol.cpp:636]

Name() = <literal>

member_name = x

Aborting...

Problem with compiling basisFunc_computeBasisFunction.hlslERROR: Expected a object of type 'struct'

While processing <buffer>:160

In compiler at GetSubpart()[astsymbol.cpp:636]

Name() = <literal>

member_name = x

Aborting...

Problem with compiling basisFunc_computeBasisFunction_addr.hlsl

(ignore the line numbers on the left. All numbers variables are declared as double).

23 sum = 1.0;

24 exponent = val;

26 sum += exponent;

27 exponent*=exponent;

28 tmp = exponent / 2.0;

29 sum += tmp;

30 exponent*=exponent;

32 sum += exponent/6.0;

33 exponent*=exponent;

34 sum += exponent/24.0;

35 exponent*=exponent;

36 sum += exponent/120.0;

37 exponent*=exponent;

38 sum += exponent/720.0;

39 exponent*=exponent;

41 basis = sum;

Hi Rick,

There seems to be some issue with codegen while using double literals in an expression.

As a workaround you can declare your double literals before using them in an expression. e.g. change

sum += exponent/<literal>

to

double temp = <literal>;

sum += exponent/temp;