Technical Overview of Linux: Shell Mathematics and Logical Operations

In the shell environment, the following methods are supported for mathematical or logical operations. Using the expr command to perform mathematical or logical operations directly, such as<span><span>expr 2 + 2</span></span>. Using the bc command, data is piped into the bc command for calculations, for example<span><span>echo "scale=4; 3.44/5" | bc</span></span>. Using the<span><span>$ and $[operation]</span></span> format brackets … Read more

Cortex Authority Manual – CMSIS-DSP Library

Cortex Authority Manual - CMSIS-DSP Library

Basic Mathematical Operations Addition #include "arm_math.h" arm_status arm_add_q7(q7_t *pSrcA, q7_t *pSrcB, q7_t *pDst, uint32_t blockSize) { for (uint32_t i = 0; i < blockSize; i++) { pDst[i] = (q7_t)(__SSAT(((__q7_t)pSrcA[i] + (__q7_t)pSrcB[i]), 8)); } return ARM_MATH_SUCCESS; } Subtraction arm_status arm_sub_q7(q7_t *pSrcA, q7_t *pSrcB, q7_t *pDst, uint32_t blockSize) { for (uint32_t i = 0; i < blockSize; … Read more

Using the STM32F4xx Hardware Floating Point Unit in ARM MDK

Using the STM32F4xx Hardware Floating Point Unit in ARM MDK

1. Introduction Some engineers have reported that they cannot use the STM32F4xx hardware floating point unit under Keil, resulting in excessively long computation times for floating point operations. Additionally, some people are unsure how to use the complex mathematical operations available in the chip, such as trigonometric functions. This article will provide a detailed introduction … Read more

Common Syntax of CMake (Mathematical Calculations)

Common Syntax of CMake (Mathematical Calculations)

Previous Highlights:CMake Hello, WorldCMake VariablesCMake Official Tutorial (Basic Project Setup)CMake Official Tutorial (Library Creation)CMake Official Tutorial (Usage Requirements)CMake Official Tutorial (Installation and Testing)CMake Common Syntax (if Statements)CMake Common Syntax (Cache Variables)CMake Common Syntax (Environment Variables) The math command in CMake is primarily used to perform simple integer mathematical operations during the build configuration phase, making … Read more

How Fast Is the DSP Algorithm Library?

How Fast Is the DSP Algorithm Library?

1. Introduction In ARM microcontroller development, there is a CMSIS DSP library provided for digital signal processing functions. This library includes basic data functions, fast mathematical operations, complex operations, filters, matrices, transformations, click control, statistics, support functions, and interpolation functions, covering most algorithms used in engineering applications. I have a question: how much speed improvement … Read more

How Fast Is the DSP Algorithm Library? A Performance Comparison

How Fast Is the DSP Algorithm Library? A Performance Comparison

In ARM microcontroller development, there is a DSP function library provided by CMSIS. This library includes basic data functions, fast mathematical operations, complex operations, filters, matrices, transforms, click control, statistics, support functions, and interpolation functions, covering most algorithms used in engineering applications. Now, I have a question: how much speed improvement can be achieved by … Read more