Skip to main content
23-Emerald V
November 1, 2025
Question

MEP - Extend truncation, rounding and mod functions to fully complex arguments and to matrices

  • November 1, 2025
  • 0 replies
  • 213 views

The Mathcad rounding and truncation functions take the form function(z,y), where z may be complex but y must be real,

 

This is an unnecessary restriction and contravenes the Zen of Mathcad Rule 16.

 

This Mathcad Enhancement Proposal (MEP) extends the y argument to accept complex numbers.

 

Furthermore, the rounding and truncation functions operate only on scalars and vectors, not on matrices.  This is, again, an unnecessary restriction.

 

This MEP extends the truncation and rounding functions to accept matrix arguments.

 

The MEP further adds a function frac(z) that complements trunc by returning the fractional part of complex zfrac vectorizes over its arguments. 

 

The MEP further extends the mod function to accept complex arguments; mod vectorizes over its arguments.

 

2025 11 01 A.png

 

2025 11 01 B.png

 

Stuart

 

Demonstration Mathcad Express 10 worksheet attached in support of the MEP.