Comments (4)
from devsim.
I once had access to MATLAB. Should be able to recreate in SymPy
>> taylor(x,20)
ans =
x
>> taylor(exp(x)-1,20)
ans =
x+1/2*x^2+1/6*x^3+1/24*x^4+1/120*x^5+1/720*x^6+1/5040*x^7+1/40320*x^8+1/362880*x^9+1/3628800*
x^10+1/39916800*x^11+1/479001600*x^12+1/6227020800*x^13+1/87178291200*x^14+1/1307674368000*x^
15+1/20922789888000*x^16+1/355687428096000*x^17+1/6402373705728000*x^18+1/121645100408832000*
x^19
>> taylor(exp(x)-1-x*exp(x),20)
ans =
-1/2*x^2-1/3*x^3-1/8*x^4-1/30*x^5-1/144*x^6-1/840*x^7-1/5760*x^8-1/45360*x^9-1/403200*x^10-1/
3991680*x^11-1/43545600*x^12-1/518918400*x^13-1/6706022400*x^14-1/93405312000*x^15-1/13948526
59200*x^16-1/22230464256000*x^17-1/376610217984000*x^18-1/6758061133824000*x^19
>> taylor((exp(x)-1)^2,20)
ans =
x^2+x^3+7/12*x^4+1/4*x^5+31/360*x^6+1/40*x^7+127/20160*x^8+17/12096*x^9+73/259200*x^10+31/604
800*x^11+2047/239500800*x^12+1/760320*x^13+8191/43589145600*x^14+5461/217945728000*x^15+4681/
1494484992000*x^16+257/697426329600*x^17+131071/3
from devsim.
Looks like std::expm1 has been available since C++11
https://en.cppreference.com/w/cpp/numeric/math/expm1
from devsim.
finished in release 1.1.0
from devsim.
Related Issues (20)
- clear all state HOT 1
- math compile time dynamic linking HOT 1
- bad transient current HOT 1
- handle derivatives in edge_from_node_model or make it automatc.
- allow python threading HOT 1
- python with bad floating point numbers
- simplify Bernoulli function HOT 1
- contact issues HOT 5
- Error: "Electrons" is missing from all the blocks of this composite dataset
- bad tetrahedra HOT 2
- better recovery from FPE
- easier interface charge HOT 1
- get/set I/Q for previous time steps
- interface node model make it possible to specify region by name
- error out if parameter shadows circuit
- delete parameters HOT 1
- convert numpy float to float
- possible bug in InterfaceEquation? HOT 4
- convergence test callback
- get equation permutation vector
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devsim.