peacefulLizard50262

MathComplexNumbers

This is a Pine Script library for handling complex numbers without arrays. It contains several utility functions for performing various operations on complex numbers, including converting complex numbers into tuples, getting the real and imaginary parts of a complex number, adding and subtracting complex numbers, computing the conjugate, multiplying and dividing complex numbers, computing the reciprocal, the inverse, the negative, the exponential, the ceil and the radius of a complex number.

The library exports a complex data type which consists of two float values: re, the real part of the complex number, and im, the imaginary part of the complex number.

The complex_tuple function and ct function convert a complex number into a tuple, and the get_real, get_imaginary, re, and im functions return the real and imaginary parts of a complex number.

The add and subtract functions add and subtract two complex numbers, respectively, by performing the appropriate arithmetic operations on their real and imaginary parts. The conjugate function returns the complex conjugate of a given complex number, which is the same as the original number but with the sign of its imaginary part reversed. The multiply and divide functions multiply and divide two complex numbers, respectively, according to the rules of complex arithmetic. The reciprocal function computes the reciprocal or inverse of a given complex number, while the inverse function computes the inverse of a given complex number. The negative function returns the negative of a given complex number, and the exponential function computes the exponential of a given complex number. The ceil function rounds a given complex number up to a specified number of digits. The radius function computes the radius (magnitude) of a given complex number, which is defined as its distance from the origin (0,0) of the complex plane.

مكتبة باين

كمثال للقيم التي تتبناها TradingView، نشر المؤلف شيفرة باين كمكتبة مفتوحة المصدر بحيث يمكن لمبرمجي باين الآخرين من مجتمعنا استخدامه بحرية. تحياتنا للمؤلف! يمكنك استخدام هذه المكتبة بشكل خاص أو في منشورات أخرى مفتوحة المصدر، ولكن إعادة استخدام هذا الرمز في المنشور تحكمه قواعد الموقع.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذه المكتبة؟

انسخ النص إلى الحافظة وألصقه في النص البرمجي الخاص بك.