How can I do more accurate calculation Ln(1+x) in Verilog-A

Status
Not open for further replies.

Jihwan_Park

Newbie level 4
Joined
Feb 1, 2021
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
60
Hi,
I want to calculate ln(1+x)in verilog A. I know that the code is
y = ln(1+x);
But if the x value becomes very small(ex x=3.52e-18), the y value becomes zero. In MATLAB, I can calculate like
y=log1p(x);
and I want to calculate like that code. How can I calculate more accurately?
 

you can examine the properties of natural logs and Taylor or McClaurin expansions

this may be a start
 
Thx it is very helpful for me!
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…