Closed justonlyasy closed 2 years ago
In pair.h, the pow command defined as following
pair.h
pow
// Complex exponentiation inline pair pow(const pair& z, const pair& w) { double u=w.getx(); double v=w.gety(); if(z == 0.0) return w == 0.0 ? 1.0 : 0.0; double logr=0.5*log(z.abs2()); double th=z.angle(); return exp(logr*u-th*v)*expi(logr*v+th*u); }
When I run this code on http://asymptote.ualberta.ca/
pair a=(7,0); pair b=(0.9,-33); pair c=sqrt(a); // accepted pair q=pow(a,b);
I get
pair q=pow(a,b); ^ workspace_1.asy: 6.8: no matching variable 'pow'
How to write this command?
pair q=a^b;
In
pair.h
, thepow
command defined as followingWhen I run this code on http://asymptote.ualberta.ca/
I get
How to write this command?