ഗണിതം#
ആമുഖം#
മാത്തിൽ ബിൽറ്റ്-ഇൻ പൈത്തൺ ഫംഗ്ഷനുകളും VEXcode AIR-ൽ യാന്ത്രികമായി ലഭ്യമാകുന്ന പൂർണ്ണ math മൊഡ്യൂളും ഉൾപ്പെടുന്നു. അടിസ്ഥാന ഗണിതം മുതൽ വിപുലമായ ത്രികോണമിതി, റൗണ്ടിംഗ്, ലോഗരിഥമിക് പ്രവർത്തനങ്ങൾ വരെ എല്ലാം ചെയ്യാൻ ഈ ഉപകരണങ്ങൾ നിങ്ങളെ അനുവദിക്കുന്നു.
VEX AIR ഡ്രോൺ കൺട്രോളറിനായുള്ള സ്ഥാനങ്ങൾ, കോണുകൾ, ദൂരങ്ങൾ, മറ്റ് സംഖ്യാ മൂല്യങ്ങൾ എന്നിവ കണക്കാക്കാൻ ഈ ഫംഗ്ഷനുകളും സ്ഥിരാങ്കങ്ങളും ഉപയോഗിക്കുക. നിങ്ങൾക്ക് ഡിഗ്രികൾക്കും റേഡിയനുമിടയിൽ പരിവർത്തനം ചെയ്യാനും എക്സ്പ്രഷനുകൾ വിലയിരുത്താനും ഇൻഫിനിറ്റി, NaN പോലുള്ള പ്രത്യേക മൂല്യങ്ങളുമായി പ്രവർത്തിക്കാനും കഴിയും.
കുറിപ്പ്: വ്യക്തമായി രേഖപ്പെടുത്തിയിട്ടില്ലാത്ത സാഹചര്യങ്ങൾ ഒഴികെ, എല്ലാ റിട്ടേൺ മൂല്യങ്ങളും ഫ്ലോട്ടുകൾ ഫോർമാറ്റ് ചെയ്തിരിക്കുന്നത് കൃത്യമായി അഞ്ച് ദശാംശ സ്ഥാനങ്ങളിലാണ്. അഞ്ച് ദശാംശ സ്ഥാനങ്ങളിൽ കൂടുതലുള്ള മൂല്യങ്ങൾ വൃത്താകൃതിയിലായിരിക്കും, കൂടാതെ അഞ്ച് ദശാംശ സ്ഥാനങ്ങളിൽ കുറവുള്ള മൂല്യങ്ങൾ പൂജ്യങ്ങൾ ഉപയോഗിച്ച് നീട്ടപ്പെടും, അങ്ങനെ കൃത്യം അഞ്ച് ദശാംശ സ്ഥാനങ്ങൾ എല്ലായ്പ്പോഴും പ്രദർശിപ്പിക്കപ്പെടും.
ലഭ്യമായ ഗണിത ഫംഗ്ഷനുകൾ, സ്ഥിരാങ്കങ്ങൾ, യൂട്ടിലിറ്റികൾ എന്നിവയുടെ ഒരു ലിസ്റ്റ് താഴെ കൊടുക്കുന്നു:
ബിൽറ്റ്-ഇൻ ഫംഗ്ഷനുകൾ - പൈത്തണിൽ ഉൾപ്പെടുത്തിയിരിക്കുന്ന സാധാരണ ഗണിത ഉപകരണങ്ങൾ.
abs– ഒരു സംഖ്യയുടെ കേവല മൂല്യം നൽകുന്നു.round– ഒരു സംഖ്യയെ നിശ്ചിത ദശാംശ സ്ഥാനങ്ങളിലേക്ക് റൗണ്ട് ചെയ്യുന്നു.min– ഇൻപുട്ട് മൂല്യങ്ങളിൽ ഏറ്റവും ചെറിയത് നൽകുന്നു.max– ഇൻപുട്ട് മൂല്യങ്ങളിൽ ഏറ്റവും വലുത് നൽകുന്നു.sum– ഒരു ഇറ്ററബിളിലെ എല്ലാ മൂല്യങ്ങളും ചേർക്കുന്നു.divmod– ഘടകാംശവും ശിഷ്ടവും ഒരു ട്യൂപ്പിളായി നൽകുന്നു.pow– ഒരു സംഖ്യയെ ഒരു പവറിലേക്ക് ഉയർത്തുന്നു, ഓപ്ഷണലായി ഒരു മോഡുലസ് ഉപയോഗിച്ച്.int– ഒരു മൂല്യത്തെ ഒരു പൂർണ്ണസംഖ്യയിലേക്ക് പരിവർത്തനം ചെയ്യുന്നു.float– ഒരു മൂല്യത്തെ ഒരു ഫ്ലോട്ടിംഗ്-പോയിന്റ് സംഖ്യയിലേക്ക് പരിവർത്തനം ചെയ്യുന്നു.
സ്ഥിരാങ്കങ്ങൾ - math മൊഡ്യൂളിൽ നിന്നുള്ള മുൻനിശ്ചയിച്ച മൂല്യങ്ങൾ.
math.pi– സ്ഥിരാങ്കം π (പൈ).math.tau– സ്ഥിരാങ്കം ടൗ (2π).math.e– സ്വാഭാവിക ലോഗിന്റെ ബേസ്, യൂളർ സംഖ്യ.math.inf– പോസിറ്റീവ് ഇൻഫിനിറ്റി.math.nan- ഒരു സംഖ്യയല്ല (NaN).
ത്രികോണമിതി - വശങ്ങൾ തമ്മിലുള്ള കോണുകളും ബന്ധങ്ങളും കണക്കാക്കുക.
math.sin– റേഡിയനുകളിൽ ഒരു കോണിന്റെ സൈൻ.math.cos– റേഡിയനുകളിൽ ഒരു കോണിന്റെ കോസൈൻ.math.tan– റേഡിയനുകളിൽ ഒരു കോണിന്റെ ടാൻജെന്റ്.math.asin– റേഡിയനുകളിൽ ഒരു മൂല്യത്തിന്റെ ആർക്ക്സൈൻ.math.acos– റേഡിയനുകളിൽ ഒരു മൂല്യത്തിന്റെ ആർക്കോസിൻ.math.atan– റേഡിയനുകളിൽ ഒരു മൂല്യത്തിന്റെ ആർക്റ്റാൻജന്റ്.math.atan2– ക്വാഡ്രന്റ് കണക്കിലെടുക്കുമ്പോൾ, റേഡിയനുകളിൽ y/x ന്റെ ആർക്റ്റാൻജന്റ്.math.degrees– റേഡിയനുകളെ ഡിഗ്രികളാക്കി മാറ്റുന്നു.math.radians– ഡിഗ്രികളെ റേഡിയനുകളാക്കി മാറ്റുന്നു.
ഹൈപ്പർബോളിക്സ് - വിപുലമായ ട്രിഗ്-അനുബന്ധ പ്രവർത്തനങ്ങൾ.
math.sinh– ഒരു മൂല്യത്തിന്റെ ഹൈപ്പർബോളിക് സൈൻ.math.cosh– ഒരു മൂല്യത്തിന്റെ ഹൈപ്പർബോളിക് കോസൈൻ.math.tanh– ഒരു മൂല്യത്തിന്റെ ഹൈപ്പർബോളിക് ടാൻജെന്റ്.math.asinh– വിപരീത ഹൈപ്പർബോളിക് സൈൻ.math.acosh– വിപരീത ഹൈപ്പർബോളിക് കോസൈൻ.math.atanh– വിപരീത ഹൈപ്പർബോളിക് ടാൻജെന്റ്.
റൗണ്ടിംഗ് & കേവല മൂല്യം – കൃത്യതയോ ദിശയോ ക്രമീകരിക്കുക.
math.ceil– ഏറ്റവും അടുത്തുള്ള പൂർണ്ണസംഖ്യയിലേക്ക് റൗണ്ട് ചെയ്യുന്നു.math.floor– ഏറ്റവും അടുത്തുള്ള പൂർണ്ണസംഖ്യയിലേക്ക് റൗണ്ട് ചെയ്യുന്നു.math.trunc– ദശാംശ ഭാഗം നീക്കം ചെയ്യുന്നു.math.fabs– ഒരു ഫ്ലോട്ടായി കേവല മൂല്യം നൽകുന്നു.
എക്സ്പോണന്റുകളും ലോഗരിതങ്ങളും - പവർ, റൂട്ട്, ലോഗ് കണക്കുകൂട്ടലുകൾ.
math.pow– ഒരു സംഖ്യയെ ഒരു ശക്തിയിലേക്ക് ഉയർത്തുന്നു.math.sqrt– വർഗ്ഗമൂലത്തെ തിരികെ നൽകുന്നു.math.exp– x ന്റെ ശക്തിയിലേക്ക് e കണക്കാക്കുന്നു.math.log– സ്വാഭാവിക ലോഗരിതം (ബേസ് e).math.log10– ബേസ്-10 ലോഗരിതം.math.log2– ബേസ്-2 ലോഗരിതം.math.factorial– ഒരു പൂർണ്ണസംഖ്യയുടെ ഫാക്റ്റോറിയൽ.math.expm1–e^x - 1ന് കൂടുതൽ കൃത്യമായ ഫലം.
ഫ്ലോട്ടിംഗ് പോയിന്റ് പ്രവർത്തനങ്ങൾ - ഫ്ലോട്ട് മൂല്യങ്ങൾ പരിശോധിക്കുക അല്ലെങ്കിൽ വിഘടിപ്പിക്കുക.
math.modf– ഒരു ഫ്ലോട്ടിന്റെ ഫ്രാക്ഷണൽ, ഇൻറിജർ ഭാഗങ്ങൾ തിരികെ നൽകുന്നു.math.frexp– ഒരു സംഖ്യയെ മാന്റിസ്സയായും ഘാതാംഗമായും വിഘടിപ്പിക്കുന്നു.math.fmod– ഡിവിഡന്റിന്റെ ചിഹ്നമുള്ള ശിഷ്ടം.math.copysign– മറ്റൊന്നിന്റെ ചിഹ്നമുള്ള ഒരു മൂല്യം നൽകുന്നു.math.ldexp–x * (2 ** exp)കണക്കാക്കുന്നു.
താരതമ്യവും ഏകദേശവും - സഹിഷ്ണുതകളുമായോ വിഭാഗങ്ങളുമായോ മൂല്യങ്ങൾ പരിശോധിക്കുക.
math.isfinite– ഒരു സംഖ്യ പരിമിതമാണോ എന്ന് പരിശോധിക്കുന്നു.math.isinf– ഒരു സംഖ്യ അനന്തമാണോ എന്ന് പരിശോധിക്കുന്നു.math.isnan– ഒരു മൂല്യം NaN ആണോ എന്ന് പരിശോധിക്കുന്നു.
പിശകും ഗാമയും – പ്രത്യേക ഗണിത പ്രവർത്തനങ്ങൾ.
math.gamma– ഗാമ ഫംഗ്ഷൻ (സാമാന്യവൽക്കരിച്ച ഫാക്റ്റോറിയൽ).math.lgamma– ലോഗരിഥമിക് ഗാമ.math.erf– പിശക് പ്രവർത്തനം.math.erfc– കോംപ്ലിമെന്ററി പിശക് ഫംഗ്ഷൻ.
ബിൽറ്റ്-ഇൻ ഫംഗ്ഷനുകൾ#
നിങ്ങളുടെ പ്രോജക്റ്റിനുള്ളിൽ ഗണിത പ്രവർത്തനങ്ങൾ നടത്താൻ നിങ്ങളെ അനുവദിക്കുന്ന നിരവധി ബിൽറ്റ്-ഇൻ ഫംഗ്ഷനുകൾ പൈത്തൺ നൽകുന്നു.
abs#
abs ഒരു സംഖ്യയുടെ കേവല മൂല്യം നൽകുന്നു, ഏതെങ്കിലും നെഗറ്റീവ് ചിഹ്നം നീക്കം ചെയ്യുന്നു.
Usage:
abs(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ഒരു പൂർണ്ണസംഖ്യ അല്ലെങ്കിൽ ഫ്ലോട്ട്. |
# Get the absolute value of -10
abs_result = abs(-10)
controller.screen.print(abs_result)
# abs_result = 10
round#
round ഒരു പൂർണ്ണസംഖ്യയായി ഒരു നിശ്ചിത സംഖ്യയുടെ ദശാംശ സ്ഥാനങ്ങളിലേക്ക് ഒരു വൃത്താകൃതിയിലുള്ള സംഖ്യ നൽകുന്നു.
Usage:
round(x, ndigits)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ഒരു പൂർണ്ണസംഖ്യ അല്ലെങ്കിൽ ഫ്ലോട്ട്. |
|
ഓപ്ഷണൽ. എത്ര ദശാംശസ്ഥാനങ്ങളിലേക്ക് (0 നും 5 നും ഇടയിൽ) റൗണ്ട് ചെയ്യണമെന്ന് നിയന്ത്രിക്കുന്നു. ഡിഫോൾട്ട് 0 ആണ്. ഈ പാരാമീറ്റർ ഉപയോഗിക്കുമ്പോൾ, |
# Round 5.7 to the nearest integer
round_int_result = round(5.7)
controller.screen.print(round_int_result)
# round_int_result = 6
# Round 3.14159 to 2 decimal places
round_result = round(3.14159, 2)
controller.screen.print(round_result)
# round_result = 3.14000
min#
min ഒന്നിലധികം ആർഗ്യുമെന്റുകളിൽ നിന്നോ ഒരു ഇറ്ററബിളിൽ നിന്നോ ഉള്ള ഏറ്റവും ചെറിയ മൂല്യം നൽകുന്നു.
Usage:
min(arg1, arg2, …) or min(sequence)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
താരതമ്യം ചെയ്യേണ്ട സംഖ്യകൾ. |
|
ഒരു ലിസ്റ്റ്, ട്യൂപ്പിൾ അല്ലെങ്കിൽ അക്കങ്ങൾ അടങ്ങിയ മറ്റ് ശ്രേണി. |
# Get the smallest number from 3, 7, and 1
min_result = min(3, 7, 1)
controller.screen.print(min_result)
# min_result = 1
# Get the smallest value from a list
min_list_result = min([10, 4, 25, 1])
controller.screen.print(min_list_result)
# min_list_result = 1
max#
ഒന്നിലധികം ആർഗ്യുമെന്റുകളിൽ നിന്നോ ഒരു ഇറ്ററബിളിൽ നിന്നോ ഏറ്റവും വലിയ മൂല്യം max നൽകുന്നു.
Usage:
max(arg1, arg2, …) or max(sequence)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
താരതമ്യം ചെയ്യേണ്ട സംഖ്യകൾ. |
|
ഒരു ലിസ്റ്റ്, ട്യൂപ്പിൾ അല്ലെങ്കിൽ അക്കങ്ങൾ അടങ്ങിയ മറ്റ് ശ്രേണി. |
# Get the largest number from 3, 7, and 1
max_result = max(3, 7, 1)
controller.screen.print(max_result)
# max_result = 7
# Get the largest value from a list
max_list_result = max([10, 4, 25, 1])
controller.screen.print(max_list_result)
# max_list_result = 25
sum#
sum എന്നത് ഒരു ഇറ്ററബിളിലെ എല്ലാ മൂല്യങ്ങളെയും ഒരു ഓപ്ഷണൽ ആരംഭ മൂല്യത്തോടെ കൂട്ടിച്ചേർക്കുന്നു.
Usage:
sum(sequence, start)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ഒരു ലിസ്റ്റ്, ട്യൂപ്പിൾ അല്ലെങ്കിൽ അക്കങ്ങൾ അടങ്ങിയ മറ്റ് ശ്രേണി. |
|
ഓപ്ഷണൽ. തുകയിലേക്ക് ചേർക്കേണ്ട ഒരു മൂല്യം. ഡിഫോൾട്ട് 0 ആണ്. |
# Calculate the sum of a list of numbers
sum_result = sum([1, 2, 3, 4, 5])
controller.screen.print(sum_result)
# sum_result = 15
# Calculate the sum of a list with a starting value of 10
sum_with_start = sum([1, 2, 3], 10)
controller.screen.print(sum_with_start)
# sum_with_start = 16
divmod#
divmod ഒരു ഹരണ പ്രവർത്തനത്തിന്റെ ഘടകവും ശിഷ്ടവും അടങ്ങിയ ഒരു ട്യൂപ്പിൾ നൽകുന്നു.
Usage:
divmod(a, b)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ലാഭവിഹിതം. |
|
ഹരിക്കൽ ഘടകം. |
# Perform integer division and remainder of 10 / 3
divmod_result = divmod(10, 3)
controller.screen.print(divmod_result)
# divmod_result = (3, 1)
pow#
pow ഒരു പവറിലേക്ക് ഉയർത്തിയ ഒരു സംഖ്യ തിരികെ നൽകുകയും ഓപ്ഷണലായി ഒരു പൂർണ്ണസംഖ്യയായി ഒരു മോഡുലസ് പ്രവർത്തനം നടത്തുകയും ചെയ്യുന്നു.
Usage:
pow(x, y, mod)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
അടിസ്ഥാന സംഖ്യ. |
|
ഘാതം. |
|
ഓപ്ഷണൽ. ഒരു മോഡുലസ് മൂല്യം. നൽകിയിട്ടുണ്ടെങ്കിൽ, |
# Calculate 2 raised to the power of 3
pow_result = pow(2, 3)
controller.screen.print(pow_result)
# pow_result = 8
# Calculate (5 ** 3) % 7
pow_mod_result = pow(5, 3, 7)
controller.screen.print(pow_mod_result)
# pow_mod_result = 6
int#
>int ഒരു സംഖ്യയെയോ സ്ട്രിങ്ങിനെയോ പൂർണ്ണസംഖ്യയാക്കി മാറ്റുന്നു. ഒരു സ്ട്രിങ്ങിൽ നിന്ന് പരിവർത്തനം ചെയ്യുമ്പോൾ അടിസ്ഥാന പരിവർത്തനത്തെയും ഇത് പിന്തുണയ്ക്കുന്നു.
Usage:
int(x, base)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
പരിവർത്തനം ചെയ്യാനുള്ള ഒരു നമ്പർ, സ്ട്രിംഗ് അല്ലെങ്കിൽ മറ്റ് വസ്തു. |
|
ഓപ്ഷണൽ. പരിവർത്തനത്തിനായി ഉപയോഗിക്കേണ്ട സംഖ്യാ അടിസ്ഥാനം. ഡിഫോൾട്ട് 10 ആണ്. |
# Convert a float to an integer to get rid of decimals
price = 19.99
price_int = int(price)
controller.screen.print(f"{price_int} coins")
# Output: 19 coins
# Convert a string into an integer to use in calculations
user_input = "55"
user_number = int(user_input)
controller.screen.print(user_number * 2)
# Output: 110
float#
float ഒരു സംഖ്യയെയോ സ്ട്രിംഗിനെയോ ഒരു ഫ്ലോട്ടിംഗ്-പോയിന്റ് സംഖ്യയാക്കി മാറ്റുന്നു.
Usage:
float(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
പരിവർത്തനം ചെയ്യാനുള്ള ഒരു നമ്പർ, സ്ട്രിംഗ് അല്ലെങ്കിൽ മറ്റ് വസ്തു. |
# Convert division result to a float
num_apples = 6
num_people = 2
apples_per_person = float(num_apples) / num_people
controller.screen.print(apples_per_person)
# Output: 3.00000
# Convert a string into a float to use in calculations
user_input = "23.4"
user_number = float(user_input)
controller.screen.print(user_number * 3)
# Output: 70.20000
ഗണിത മൊഡ്യൂൾ#
മൈക്രോപൈത്തണിലെ math മൊഡ്യൂൾ സാധാരണ ഗണിത കണക്കുകൂട്ടലുകൾ നടത്തുന്നതിനുള്ള അധിക രീതികൾ നൽകുന്നു. ഈ രീതികളിൽ ത്രികോണമിതി, ലോഗരിഥമിക്, മറ്റ് സംഖ്യാ പ്രവർത്തനങ്ങൾ എന്നിവ ഉൾപ്പെടുന്നു.
math മൊഡ്യൂൾ VEXcode-ൽ ഡിഫോൾട്ടായി ഇറക്കുമതി ചെയ്യപ്പെടുന്നു.
Constants#
ഒരു പ്രോജക്റ്റ് സമയത്ത് സ്ഥിരമായി നിലനിൽക്കുന്ന മുൻകൂട്ടി നിശ്ചയിച്ച മൂല്യങ്ങളാണ് സ്ഥിരാങ്കങ്ങൾ. നിർവചനമോ അസൈൻമെന്റോ ആവശ്യമില്ലാതെ തന്നെ കണക്കുകൂട്ടലുകളിൽ അവ ഉപയോഗിക്കാൻ കഴിയും.
പൈ#
pi എന്നത് ഗണിത സ്ഥിരാങ്കം π നൽകുന്നു, ഇത് ഒരു വൃത്തത്തിന്റെ ചുറ്റളവും വ്യാസവും തമ്മിലുള്ള അനുപാതമാണ്.
Usage:
math.pi
# Calculate the area of a circle with radius 5 using pi
circle_area = math.pi * 5 * 5
controller.screen.print(circle_area)
# circle_area = 78.53982
ടൗ#
tau 2π ന്റെ മൂല്യം നൽകുന്നു.
Usage:
math.tau
# Calculate the circumference of a circle with radius
circumference = math.tau * 5
controller.screen.print(circumference)
# circumference = 31.41593
ഇ#
e സ്വാഭാവിക ലോഗരിതത്തിന്റെ അടിസ്ഥാനം നൽകുന്നു.
Usage:
math.e
# Calculate e raised to the power of 2
e_power = math.pow(math.e, 2)
controller.screen.print(e_power)
# e_power = 7.38906
ഇൻഫ്#
inf ഒരു ഫ്ലോട്ട് ആയി പോസിറ്റീവ് ഇൻഫിനിറ്റി നൽകുന്നു.
Usage:
math.inf
# Check if infinity is infinite
inf_value = math.inf
if math.isinf(inf_value):
controller.screen.print("Infinity")
# Prints "Infinity"
നാൻ#
“നോട്ട് എ നമ്പർ” (NaN) എന്നതിനായുള്ള ഒരു പ്രത്യേക ഫ്ലോട്ടിനെ nan പ്രതിനിധീകരിക്കുന്നു.
Usage:
math.nan
# Check if nan is Not a Number
nan_value = math.nan
if math.isnan(nan_value):
controller.screen.print("Not a Number")
# Prints "Not a Number"
Trigonometry#
പാപം#
sin ഒരു കോണിന്റെ സൈൻ റേഡിയൻസിൽ കണക്കാക്കി ഒരു ഫ്ലോട്ട് തിരികെ നൽകുന്നു.
Usage:
math.sin(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
റേഡിയൻസിൽ ഒരു കോണിനെ പ്രതിനിധീകരിക്കുന്ന ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Calculate the sine of 30 degrees in radians
sine_result = math.sin(math.radians(30))
controller.screen.print(sine_result)
# sine_result = 0.50000
കാരണം#
cos റേഡിയൻസിൽ ഒരു കോണിന്റെ കോസൈൻ കണക്കാക്കുകയും ഒരു ഫ്ലോട്ട് തിരികെ നൽകുകയും ചെയ്യുന്നു.
Usage:
math.cos(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
റേഡിയൻസിൽ ഒരു കോണിനെ പ്രതിനിധീകരിക്കുന്ന ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Calculate the cosine of 60 degrees in radians
cosine_result = math.cos(math.radians(60))
controller.screen.print(cosine_result)
# cosine_result = 0.50000
ടാൻ#
tan റേഡിയൻസിൽ ഒരു കോണിന്റെ ടാൻജെന്റ് കണക്കാക്കുകയും ഒരു ഫ്ലോട്ട് തിരികെ നൽകുകയും ചെയ്യുന്നു.
Usage:
math.tan(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
റേഡിയൻസിൽ ഒരു കോണിനെ പ്രതിനിധീകരിക്കുന്ന ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Calculate the tangent of 45 degrees in radians
tangent_result = math.tan(math.radians(45))
controller.screen.print(tangent_result)
# tangent_result = 1.00000
അസിൻ#
asin ഒരു സംഖ്യയുടെ വിപരീത സൈൻ (ആർക്ക് സൈൻ) കണക്കാക്കുകയും റേഡിയനുകളിൽ കോണിനെ പ്രതിനിധീകരിക്കുന്ന ഒരു ഫ്ലോട്ട് തിരികെ നൽകുകയും ചെയ്യുന്നു.
Usage:
math.asin(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
-1 നും 1 നും ഇടയിലുള്ള ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Calculate the arc sine of 0.5 in radians
arc_sine_result = math.asin(0.5)
controller.screen.print(arc_sine_result)
# arc_sine_result = 0.52360
അക്കോസ്#
acos ഒരു സംഖ്യയുടെ വിപരീത കോസൈൻ (ആർക്ക് കോസൈൻ) കണക്കാക്കുകയും റേഡിയനുകളിൽ കോണിനെ പ്രതിനിധീകരിക്കുന്ന ഒരു ഫ്ലോട്ട് തിരികെ നൽകുകയും ചെയ്യുന്നു.
Usage:
>math.acos(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
-1 നും 1 നും ഇടയിലുള്ള ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Calculate the arc cosine of 0.5 in radians
arc_cosine_result = math.acos(0.5)
controller.screen.print(arc_cosine_result)
# arc_cosine_result = 1.04720
ആതൻ#
atan ഒരു സംഖ്യയുടെ വിപരീത ടാൻജെന്റ് (ആർക്ക് ടാൻജെന്റ്) കണക്കാക്കുകയും റേഡിയനുകളിൽ കോണിനെ പ്രതിനിധീകരിക്കുന്ന ഒരു ഫ്ലോട്ട് തിരികെ നൽകുകയും ചെയ്യുന്നു.
Usage:
math.atan(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Calculate the arc tangent of 1 in radians
arc_tangent_result = math.atan(1)
controller.screen.print(arc_tangent_result)
# arc_tangent_result = 0.78540
അറ്റൻ2#
atan2 y/x ന്റെ വിപരീത ടാൻജെന്റിന്റെ പ്രിൻസിപ്പൽ മൂല്യം കണക്കാക്കുകയും റേഡിയനുകളിൽ കോണിനെ പ്രതിനിധീകരിക്കുന്ന ഒരു ഫ്ലോട്ട് തിരികെ നൽകുകയും ചെയ്യുന്നു.
Usage:
math.atan2(y, x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
y കോർഡിനേറ്റിനെ പ്രതിനിധീകരിക്കുന്ന ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
|
x കോർഡിനേറ്റിനെ പ്രതിനിധീകരിക്കുന്ന ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Calculate the inverse tangent of (4, 3) in radians
atan2_result = math.atan2(3, 4)
controller.screen.print(atan2_result)
# atan2_result = 0.64350
ഡിഗ്രികൾ#
degrees ഒരു കോണിനെ റേഡിയനുകളിൽ നിന്ന് ഡിഗ്രികളാക്കി മാറ്റുന്നു.
Usage:
math.degrees(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
റേഡിയനുകളിൽ ഒരു കോണിനെ പ്രതിനിധീകരിക്കുന്ന ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Convert pi radians to degrees
degrees_result = math.degrees(math.pi)
controller.screen.print(degrees_result)
# degrees_result = 180.00000
റേഡിയനുകൾ#
radians ഒരു കോണിനെ ഡിഗ്രിയിൽ നിന്ന് റേഡിയൻസാക്കി മാറ്റുന്നു.
Usage:
math.radians(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ഡിഗ്രിയിൽ ഒരു കോണിനെ പ്രതിനിധീകരിക്കുന്ന ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Convert 180 degrees to radians
radians_result = math.radians(180)
controller.screen.print(radians_result)
# radians_result = 3.14159
Hyperbolics#
സിൻഹ്#
sinh x ന്റെ ഹൈപ്പർബോളിക് സൈൻ കണക്കാക്കുന്നു.
Usage:
math.sinh(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ഇൻപുട്ട് മൂല്യത്തെ പ്രതിനിധീകരിക്കുന്ന ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Calculate the hyperbolic sine of 1
sinh_result = math.sinh(1)
controller.screen.print(sinh_result)
# sinh_result = 1.7520
കോഷ്#
cosh x ന്റെ ഹൈപ്പർബോളിക് കോസൈൻ കണക്കാക്കുന്നു.
Usage:
math.cosh(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ഇൻപുട്ട് മൂല്യത്തെ പ്രതിനിധീകരിക്കുന്ന ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Calculate the hyperbolic cosine of 1
cosh_result = math.cosh(1)
controller.screen.print(cosh_result)
# cosh_result = 1.54308
ടാൻ#
tanh x ന്റെ ഹൈപ്പർബോളിക് ടാൻജെന്റ് കണക്കാക്കുന്നു.
Usage:
math.tanh(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ഇൻപുട്ട് മൂല്യത്തെ പ്രതിനിധീകരിക്കുന്ന ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Calculate the hyperbolic tangent of 1
tanh_result = math.tanh(1)
controller.screen.print(tanh_result)
# tanh_result = 0.76159
അസിന്ഹ്#
asinh x ന്റെ വിപരീത ഹൈപ്പർബോളിക് സൈൻ കണക്കാക്കുന്നു.
Usage:
math.asinh(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ഇൻപുട്ട് മൂല്യത്തെ പ്രതിനിധീകരിക്കുന്ന ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Calculate the inverse hyperbolic sine of 1
asinh_result = math.asinh(1)
controller.screen.print(asinh_result)
# asinh_result = 0.88137
അക്കോഷ്#
acosh x ന്റെ വിപരീത ഹൈപ്പർബോളിക് കോസൈൻ കണക്കാക്കുന്നു.
Usage:
math.acosh(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
1-നേക്കാൾ വലുതോ തുല്യമോ ആയ ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Calculate the inverse hyperbolic cosine of 2
acosh_result = math.acosh(2)
controller.screen.print(acosh_result)
# acosh_result = 1.31696
അതാൻ#
atanh x ന്റെ വിപരീത ഹൈപ്പർബോളിക് ടാൻജെന്റ് കണക്കാക്കുന്നു.
Usage:
math.atanh(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
-1 നും 1 നും ഇടയിലുള്ള ഒരു ഫ്ലോട്ട് (എക്സ്ക്ലൂസീവ്). |
# Calculate the inverse hyperbolic tangent of 0.5
atanh_result = math.atanh(0.5)
controller.screen.print(atanh_result)
# atanh_result = 0.54931
Rounding & Absolute Values#
സീൽ#
ceil ഒരു സംഖ്യയെ ഏറ്റവും അടുത്തുള്ള പൂർണ്ണസംഖ്യയിലേക്ക് റൗണ്ട് ചെയ്യുന്നു.
Usage:
math.ceil(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
റൗണ്ട് അപ്പ് ചെയ്യേണ്ട ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Round 3.7 up to the nearest integer
ceil_result = math.ceil(3.7)
controller.screen.print(ceil_result)
# ceil_result = 4
തറ#
floor ഒരു സംഖ്യയെ ഏറ്റവും അടുത്തുള്ള പൂർണ്ണസംഖ്യയിലേക്ക് റൗണ്ട് ചെയ്യുന്നു.
Usage:
math.floor(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
റൗണ്ട് ഡൌൺ ചെയ്യേണ്ട ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Round 3.7 down to the nearest integer
floor_result = math.floor(3.7)
controller.screen.print(floor_result)
# floor_result = 3
തുമ്പ്#
trunc ഒരു സംഖ്യയുടെ ദശാംശ ഭാഗം റൗണ്ടിംഗ് ഇല്ലാതെ നീക്കം ചെയ്യുന്നു.
Usage:
math.trunc(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
വെട്ടിച്ചുരുക്കേണ്ട ഒരു ഫ്ലോട്ട്. |
# Remove the decimal part of 3.7
trunc_result = math.trunc(3.7)
controller.screen.print(trunc_result)
# trunc_result = 3
ഫാബ്സ്#
fabs ഒരു സംഖ്യയുടെ കേവല മൂല്യം ഫ്ലോട്ടായി നൽകുന്നു.
Usage:
math.fabs(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Get the absolute value of -3.7
fabs_result = math.fabs(-3.7)
controller.screen.print(fabs_result)
# fabs_result = 3.70000
Exponents & Logarithms#
പവ്#
pow x നെ y (xy) ന്റെ ശക്തിയിലേക്ക് ഉയർത്തി ഒരു ഫ്ലോട്ട് തിരികെ നൽകുന്നു.
Usage:
math.pow(x, y)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യാ ബേസ്. |
|
ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ എക്സ്പോണന്റ്. |
# Calculate 2 raised to the power of 3
power_result = math.pow(2, 3)
controller.screen.print(power_result)
# power_result = 8.00000
ചതുരശ്രം#
sqrt ഒരു സംഖ്യയുടെ വർഗ്ഗമൂലം കണക്കാക്കി ഒരു ഫ്ലോട്ട് തിരികെ നൽകുന്നു.
Usage:
math.sqrt(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ഒരു നോൺ-നെഗറ്റീവ് ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Calculate the square root of 16
sqrt_result = math.sqrt(16)
controller.screen.print(sqrt_result)
# sqrt_result = 4.00000
എക്സ്പ്രഷൻ#
exp e x (ex) ന്റെ പവറിലേക്ക് ഉയർത്തി ഒരു ഫ്ലോട്ട് ആയി നൽകുന്നു.
Usage:
math.exp(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Calculate e raised to the power of 1
exp_result = math.exp(1)
controller.screen.print(exp_result)
# exp_result = 2.71828
ലോഗ്#
log ഒരു സംഖ്യയുടെ സ്വാഭാവിക ലോഗരിതം കണക്കാക്കുകയും ഒരു ഫ്ലോട്ട് തിരികെ നൽകുകയും ചെയ്യുന്നു.
Usage:
math.log(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ഒരു പോസിറ്റീവ് ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Calculate the natural logarithm (base e) of 7.389056
log_result = math.log(7.389056)
controller.screen.print(log_result)
# log_result = 2.00000
ലോഗ്10#
log10 ഒരു സംഖ്യയുടെ ബേസ്-10 ലോഗരിതം കണക്കാക്കുകയും ഒരു ഫ്ലോട്ട് തിരികെ നൽകുകയും ചെയ്യുന്നു.
Usage:
math.log10(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ഒരു പോസിറ്റീവ് ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Calculate the base-10 logarithm of 1000
log10_result = math.log10(1000)
controller.screen.print(log10_result)
# log10_result = 3.00000
ലോഗ്2#
log2 calculates the base-2 logarithm of a number and returns a float, even when x is a power of 2.
Usage:
math.log2(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ഒരു പോസിറ്റീവ് ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Calculate the base-2 logarithm of 8
log2_result = math.log2(8)
controller.screen.print(log2_result)
# log2_result = 3.00000
ഫാക്ടോറിയൽ#
factorial ഒരു പൂർണ്ണസംഖ്യയായ xന്റെ ഫാക്റ്റോറിയൽ നൽകുന്നു, ഇത് x വരെയുള്ള എല്ലാ പോസിറ്റീവ് പൂർണ്ണസംഖ്യകളുടെയും ഗുണനഫലമാണ്.
Usage:
math.factorial(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
നെഗറ്റീവ് അല്ലാത്ത ഒരു പൂർണ്ണസംഖ്യ. |
# Calculate 5 factorial (5!)
factorial_result = math.factorial(5)
controller.screen.print(factorial_result)
# factorial_result = 120
എക്സ്പിഎം1#
expm1 ex - 1കണക്കാക്കുന്നു, ഇത് ചെറിയ x ന് കൂടുതൽ കൃത്യമാണ്.
Usage:
math.expm1(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ഘാതാംഗ മൂല്യം. |
# Compute expm1(1) (e^1 - 1)
expm1_result = math.expm1(1)
controller.screen.print(expm1_result)
# expm1_result = 1.71828
Floating Point Operations#
പരിഷ്കരണം#
modf ഒരു സംഖ്യയെ അതിന്റെ ഭിന്നസംഖ്യ, പൂർണ്ണസംഖ്യ ഭാഗങ്ങളായി വിഘടിപ്പിച്ച് ഒരു ട്യൂപ്പിൾ (fractional part, integer part)തിരികെ നൽകുന്നു, രണ്ടും ഫ്ലോട്ടുകളായി.
Usage:
math.modf(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
വിഘടിപ്പിക്കാനുള്ള ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Decompose 3.14159 into fractional and integer parts
fractional_part, integer_part = math.modf(3.14159)
controller.screen.print(fractional_part)
controller.screen.next_row()
controller.screen.print(integer_part)
# fractional_part = 0.14159
# integer_part = 3.00000
ഫ്രെക്സ്പ്#
frexp ഒരു സംഖ്യയെ അതിന്റെ മാന്റിസ്സയായും എക്സ്പോണന്റായും വിഘടിപ്പിച്ച് ഒരു ട്യൂപ്പിൾ (mantissa, exponent)നൽകുന്നു, ഇവിടെ മാന്റിസ്സ ഒരു ഫ്ലോട്ടും എക്സ്പോണന്റ് ഒരു പൂർണ്ണസംഖ്യയുമാണ്.
Usage:
math.frexp(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
വിഘടിപ്പിക്കാനുള്ള ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Decompose 16 into its mantissa and exponent
mantissa, exponent = math.frexp(16)
controller.screen.print(mantissa)
controller.screen.next_row()
controller.screen.print(exponent)
# mantissa = 0.50000
# exponent = 5
എഫ്എംഒഡി#
fmod , ഡിവിഡന്റിന്റെ (x) ചിഹ്നം നിലനിർത്തിക്കൊണ്ട് ഹരിച്ചലിന്റെ ബാക്കി ഭാഗം നൽകുന്നു.
Usage:
math.fmod(x, y)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ലാഭവിഹിതം. |
|
ഹരിക്കൽ ഘടകം. |
# Calculate remainder of 10 / 3
# that preserves the sign of 10
fmod_result = math.fmod(10, 3)
controller.screen.print(fmod_result)
# fmod_result = 1.00000
പകർപ്പ് ചിഹ്നം#
copysign y എന്ന ചിഹ്നത്തോടെ x തിരികെ നൽകുന്നു.
Usage:
math.copysign(x, y)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
പരിഷ്ക്കരിക്കേണ്ട മൂല്യം. |
|
ചിഹ്നം പകർത്തേണ്ട മൂല്യം. |
# Return -10 with the sign of 3 (positive)
copysign_result = math.copysign(-10, 3)
controller.screen.print(copysign_result)
# copysign_result = 10.00000
ldexp GenericName#
ldexp x * (2 ** exp)കണക്കാക്കുന്നു, ഇത് x * 2exp ന് തുല്യമാണ്.
Usage:
math.ldexp(x, exp)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
അടിസ്ഥാന മൂല്യം. |
|
ഘാതം. |
# Compute 3 * (2 ** 4)
ldexp_result = math.ldexp(3, 4)
controller.screen.print(ldexp_result)
# ldexp_result = 48.00000
Comparison & Approximation#
പരിധിയില്ലാത്തത്#
ഒരു സംഖ്യ പരിമിതമാണോ എന്ന് isfinite പരിശോധിക്കുന്നു. ഈ രീതി ഒരു ബൂളിയൻ മൂല്യം നൽകുന്നു:
True- സംഖ്യ പരിമിതമാണ്.False- സംഖ്യ അനന്തമാണ്.
Usage:
math.isfinite(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
പരിശോധിക്കാനുള്ള ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Check if 42 is a finite number (returns True)
is_finite_true = math.isfinite(42)
controller.screen.print(is_finite_true)
# is_finite_true = True
# Check if infinity is a finite number (returns False)
is_finite_false = math.isfinite(math.inf)
controller.screen.print(is_finite_false)
# is_finite_false = False
ഐഎസ്ഐഎൻഎഫ്#
ഒരു സംഖ്യ അനന്തമാണോ എന്ന് isinf പരിശോധിക്കുന്നു. ഈ രീതി ഒരു ബൂളിയൻ മൂല്യം നൽകുന്നു:
True- സംഖ്യ അനന്തമാണ്.False- സംഖ്യ പരിമിതമാണ്.
Usage:
math.isinf(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
പരിശോധിക്കാനുള്ള ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Check if infinity is an infinite number (returns True)
is_inf_true = math.isinf(math.inf)
controller.screen.print(is_inf_true)
# is_inf_true = True
# Check if 42 is an infinite number (returns False)
is_inf_false = math.isinf(42)
controller.screen.print(is_inf_false)
# is_inf_false = False
ഇസ്നാൻ#
ഒരു സംഖ്യ NaN (ഒരു സംഖ്യയല്ല) ആണോ എന്ന് isnan പരിശോധിക്കുന്നു. ഈ രീതി ഒരു ബൂളിയൻ മൂല്യം നൽകുന്നു:
True- സംഖ്യ NaN ആണ്.False- നമ്പർ ഒരു സാധുവായ സംഖ്യയാണ്.
Usage:
math.isnan(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
പരിശോധിക്കാനുള്ള ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Check if NaN (Not a Number) is NaN (returns True)
is_nan_true = math.isnan(math.nan)
controller.screen.print(is_nan_true)
# is_nan_true = True
# Check if 42 is NaN (returns False)
is_nan_false = math.isnan(42)
controller.screen.print(is_nan_false)
# is_nan_false = False
Error and Gamma Calculations#
ഗാമ#
gamma xന്റെ ഗാമ ഫംഗ്ഷൻ കണക്കാക്കുന്നു, ഇത് യഥാർത്ഥ സംഖ്യകൾക്കും സങ്കീർണ്ണ സംഖ്യകൾക്കും ഫാക്റ്റോറിയൽ ഫംഗ്ഷനെ സാമാന്യവൽക്കരിക്കുന്നു. ഒരു പൂർണ്ണസംഖ്യ nന്, gamma(n) = (n-1)!.
Usage:
math.gamma(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ഒരു പോസിറ്റീവ് ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Calculate the gamma function of 5 (equivalent to 4!)
gamma_result = math.gamma(5)
controller.screen.print(gamma_result)
# gamma_result = 24.00000
എൽഗാമ#
lgamma gamma ഫംഗ്ഷന്റെ സ്വാഭാവിക ലോഗരിതം കണക്കാക്കുന്നു.
Usage:
math.lgamma(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ഒരു പോസിറ്റീവ് ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Calculate the natural logarithm of the
# gamma function of 5
lgamma_result = math.lgamma(5)
controller.screen.print(lgamma_result)
# lgamma_result = 3.17805
ഇആർഎഫ്#
erf x ന്റെ പിശക് ഫംഗ്ഷൻ കണക്കാക്കുന്നു.
Usage:
math.erf(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ഇൻപുട്ട് മൂല്യത്തെ പ്രതിനിധീകരിക്കുന്ന ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Calculate the error function of 1
erf_result = math.erf(1)
controller.screen.print(erf_result)
# erf_result = 0.84270
ഇ.ആർ.എഫ്.സി.#
erfc xന്റെ പൂരക പിശക് ഫംഗ്ഷൻ കണക്കാക്കുന്നു, ഇത് 1 - erf(x) ആയി നിർവചിച്ചിരിക്കുന്നു.
Usage:
math.erfc(x)
പാരാമീറ്റർ |
വിവരണം |
|---|---|
|
ഇൻപുട്ട് മൂല്യത്തെ പ്രതിനിധീകരിക്കുന്ന ഒരു ഫ്ലോട്ട് അല്ലെങ്കിൽ പൂർണ്ണസംഖ്യ. |
# Calculate the complementary error function of 1
erfc_result = math.erfc(1)
controller.screen.print(erfc_result)
# erfc_result = 0.15730