batch-file – Bypass arithmetic limitations in batch files – Using powershell

As the powershell is installed by default on every windows system from 7/2008 and above it can be used for more complex calculations:

@echo off
set "expression=(2+3)*10/1000"
for /f %%# in ('"powershell %expression%"') do set result=%%#
echo %result%

Mind the additional double quotes in the for /f which prevent brackets conflicts with the for command syntax.

Potential issue is that powershell is much slower than using wsh/vbscript/jscript due to the loading of the .net framerwork

if you want to reproduce, please indicate the source:
batch-file – Bypass arithmetic limitations in batch files – Using powershell - CodeDay