Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8044

Other • Re: Euler's number ,e

$
0
0
Euler's identity is verified: e^(i*pi) + 1 = 0

Code:

ubu@raspberrypi:~ $ ubu@raspberrypi:~ $ gpReading GPRC: /etc/gprcGPRC Done.                                      GP/PARI CALCULATOR Version 2.15.2 (released)                             arm64 running linux (aarch64/GMP-6.2.1 kernel) 64-bit version                              compiled: Dec 31 2022, gcc version 12.2.0 (Debian 12.2.0-11)                                               threading engine: pthread                                     (readline v8.2 enabled, extended help enabled)                                         Copyright (C) 2000-2022 The PARI GroupPARI/GP is free software, covered by the GNU General Public License, and comes WITHOUT ANY WARRANTY WHATSOEVER.Type ? for help, \q to quit.Type ?18 for how to get moral (and possibly technical) support.parisize = 8000000, primelimit = 500000, nbthreads = 4? \p 100   \\ Set precision to 100 digitss approximately 0    if (abs(real(euler_identity)) < 1e-50 && abs(imag(euler_identity)) < 1e-50,        print("Euler's identity is verified: e^(i*pi) + 1 = 0"),        print("Something went wrong.")    );}   realprecision = 115 significant digits (100 digits displayed)? {    \\ Calculate Euler's identity: e^(i*pi) + 1 = 0    euler_identity = exp(I * Pi) + 1;    print("e^(i*pi) + 1 = ", euler_identity);    \\ Verify if it equals approximately 0    if (abs(real(euler_identity)) < 1e-50 && abs(imag(euler_identity)) < 1e-50,        print("Euler's identity is verified: e^(i*pi) + 1 = 0"),        print("Something went wrong.")    );}e^(i*pi) + 1 = 1.824285982172696719505601935466101034360469388609991221509695675316674953042003747078859810526252358 E-232 + 1.910123546879990021922074519113275428937779573929853801925257840192931482047382099106906082040897564 E-116*IEuler's identity is verified: e^(i*pi) + 1 = 0? \qGoodbye!ubu@raspberrypi:~ $ neofetch --offubu@raspberrypi---------------OS: Debian GNU/Linux 12 (bookworm) aarch64Host: Raspberry Pi 4 Model B Rev 1.4Kernel: 6.12.1-v8+Uptime: 15 minsPackages: 2843 (dpkg)Shell: bash 5.2.15Terminal: /dev/pts/0CPU: (4) @ 1.800GHzMemory: 466MiB / 7808MiB

Statistics: Posted by geev03 — Thu Nov 28, 2024 4:48 pm



Viewing all articles
Browse latest Browse all 8044

Trending Articles