Some Weierstrass functions: p-function, sigma function, zeta function, and inverse p-function.
pip install pyweierstrass
Weierstrass elliptic functions
Home Page: https://pyweierstrass.readthedocs.io/en/latest/
License: GNU General Public License v3.0
# Input values of g2 and g3 are chosen
g2_num = mpc(real='-73.4914329314137', imag='95.8413827483826')
g3_num = mpc(real='54.2026055822565', imag='27.1486316597472')
# The values for g2 and g3 are then calculated from omega1 and omega2
# and the values for omega1 and omeg2 are themselves calculated from the original g2 g3
# This should return the original values but it returns -g3 instead
g_from_omega(*omega_from_g(g2_num, g3_num))
Output:
(mpc(real='-73.491432931413684', imag='95.841382748382628'),
mpc(real='-54.202605582253817', imag='-27.14863165974365'))
So instead of doing this:
perhaps the following would work better:
I have been exploring this here: https://github.com/HeskethGD/Elliptic-Functions/tree/master/numerical_evaluation
There are some numerical tests and a suggested modification that implements the above.
Thanks again for your efforts on this.
Hi !
When running _half_periods(0, 1)
I get the following:
/path/pyweierstrass/pyweierstrass/weierstrass.py, line 80, in _half_periods
j = 1728 / (1 - 27*g3*g3/g2cube)
ZeroDivisionError: division by zero
It seems that your implementation doesn't support curve with a zero j-invariant because of this. It is weird because when I try to add a check with simple if branch in case g2 is zero to set j = 0 it also complain about a zero division I don't get it honestly :')
I also found your other gists (this one) and it seems to work with g2 = 0 however it seems the half periods are not right (when g3 is not set to 1 the functions have period 1.53 which should not be the case...) .
Thanks for your work !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.