Python | fsum() function Last Updated : 16 Feb, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report fsum() is inbuilt function in Python, used to find sum between some range or an iterable. To use this function we need to import the math library. Syntax : maths.fsum( iterable ) Parameter : iterable : Here we pass some value which is iterable like arrays, list. Use : fsum() is used to find the sum of some range, array , list. Return Type : The function return a floating point number. Time Complexity: O(n) where n is the size of the list. Auxiliary Space: O(1) Code demonstrating fsum() : Python3 # Python code to demonstrate use # of math.fsum() function # fsum() is found in math library import math # range(10) print(math.fsum(range(10))) # Integer list arr = [1, 4, 6] print(math.fsum(arr)) # Floating point list arr = [2.5, 2.4, 3.09] print(math.fsum(arr)) Output : 45.0 11.0 7.99 Comment More infoAdvertise with us Next Article Python | frexp() Function K kundankumarjha Follow Improve Article Tags : Python Python-Functions python-list python-list-functions Practice Tags : pythonpython-functionspython-list Similar Reads Python | fmod() function fmod() function is one of the Standard math library function in Python, which is used to calculate the Module of the specified given arguments. Syntax: math.fmod( x, y ) Parameters: x any valid number (positive or negative). y any valid number(positive or negative). Returns: Return a floating point 2 min read Python | frexp() Function frexp() function is one of the Standard math Library function in Python. It returns mantissa and exponent as a pair (m, e) of a given value x, where mantissa m is a floating point number and e exponent is an integer value. m is a float and e is an integer such that x == m * 2**e exactly. If x is zer 2 min read sum() function in Python The sum of numbers in the list is required everywhere. Python provides an inbuilt function sum() which sums up the numbers in the list. Pythonarr = [1, 5, 2] print(sum(arr))Output8 Sum() Function in Python Syntax Syntax : sum(iterable, start) iterable : iterable can be anything list , tuples or dict 3 min read Numpy recarray.cumsum() function | Python In numpy, arrays may have a data-types containing fields, analogous to columns in a spreadsheet. An example is [(a, int), (b, float)], where each entry in the array is a pair of (int, float). Normally, these attributes are accessed using dictionary lookups such as arr['a'] and arr['b']. Record array 2 min read fmean() function in Python statistics Statistics module of Python 3.8 provides a function fmean() that converts all the data into float data-type and then computes the arithmetic mean or average of data that is provided in the form of a sequence or an iterable. The output of this function is always a float. The only difference in comput 3 min read Python PySpark sum() Function PySpark, the Python API for Apache Spark, is a powerful tool for big data processing and analytics. One of its essential functions is sum(), which is part of the pyspark.sql.functions module. This function allows us to compute the sum of a column's values in a DataFrame, enabling efficient data anal 3 min read Like