UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
1,086 Views
Registered: ‎07-25-2018

erfc and erf build in functions

Jump to solution

Hi,

 

I have used erfc() in my kerneland I am using SW_Simulation.

 

 

for (int i = 0 ; i < n_elements ; i += BUFFER_SIZE)
    {printf("%f\n", erfc(0.35));}

 

 

the program runs but the result is just like the bellow lines. the first 0.0 output and a lot of Nan out put. What should I do? could you please help me?

 

0.000000
-nan
-nan
-nan
-nan

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
937 Views
Registered: ‎11-04-2010

Re: erfc and erf build in functions

Jump to solution

Hi,  @ramin_rasoulinezhad ,

Have you tried SDx 2018.2?  I don't see the issue in 2018.2 with erfc and erf.

 

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
5 Replies
1,074 Views
Registered: ‎07-25-2018

Re: erfc and erf build in functions

Jump to solution

Another try:

 

for (int k=+100;k>-100;k--){
        ali = erfc(k * 0.01);
        printf("&&%g\n", ali);

}

 

output:

&&-5.48613e+303
&&-5.48612e+303
&&-5.48612e+303
&&-5.48612e+303
&&-5.48612e+303

.... (just like the last one)

 

0 Kudos
Moderator
Moderator
1,039 Views
Registered: ‎11-04-2010

Re: erfc and erf build in functions

Jump to solution
Hi, @ramin_rasoulinezhad ,
Which version of sw are you using?
Have you tried the latest version of sw?
Please share more code for us to reproduce the issue.
-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
1,007 Views
Registered: ‎07-25-2018

Re: erfc and erf build in functions

Jump to solution

I am using 2017.2. Is it OK?

 

In this version, all the mathematic functions work except erf and erfc.  Which version do you recommend? I am downloading 2018.2 now

 

Regards,

Ramin

0 Kudos
Moderator
Moderator
1,002 Views
Registered: ‎11-04-2010

Re: erfc and erf build in functions

Jump to solution
Hi, @ramin_rasoulinezhad ,
Please check whether the issue can still be seen in 2018.2(The latest Version is recommended)
-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Moderator
Moderator
938 Views
Registered: ‎11-04-2010

Re: erfc and erf build in functions

Jump to solution

Hi,  @ramin_rasoulinezhad ,

Have you tried SDx 2018.2?  I don't see the issue in 2018.2 with erfc and erf.

 

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos