Hi all, Consider (with mp.dps = 30):
f = mp.mpf('0.1234123094834543252345098')
q = sy.Symbol('q')
x = f*q
Now, running lambdastr over the expression we find:
'lambda q: (0.1234123094834543252345098*q)'
which is curtailed by the fact that our mpf float will be interpreted as
a Python float. Often times (especially when q is of type mpf) this is
not sufficient.
Hence, what is the best way to hack/fudge the lambdify mechanism into
either wrapping mpf constants suitably to yield:
'lambda q: (mp.mpf('constant')*q)'
or better still having them constructed once (rather than per each
evaluation)?
Polemically yours, Freddie.
signature.asc
Description: OpenPGP digital signature
