promo.fun 506 B

1234567891011121314151617181920
  1. #import std
  2. #import nat
  3. #library+
  4. retype = # takes assignments of instance recongizers to type converters
  5. -??-+ --<-[unrecognized type conversion]-!%>
  6. wrapper = # allows high precision for intermediate calculations
  7. -+.
  8. retype<%EI: ..mp2dbl,%ELI: ..mp2dbl*,%ELLI: ..mp2dbl**,%EWI: ..mp2dbl~~>!,
  9. ~&,
  10. retype<%eI: ..dbl2mp,%eLI: ..dbl2mp*,%eLLI: ..dbl2mp**,%eWI: ..dbl2mp~~>!+-
  11. rad_to_deg = # converts radians to degrees with high precision
  12. wrapper mp..mul/1.8E2+ mp..div^/~& mp..pi+ mp..prec