Skip to content
Property Value
Hex Value $B7
Categories
Localizations
  • FR: prod(

prod(

Overview

Returns product of list elements between start and end

Availability: Token available everywhere.

Syntax

prod(list[,start,end])

Arguments

NameTypeOptional
listlist
startYes
endYes

Location

2nd, list, MATH, 6:prod(


Description

The prod( command calculates the product of all or part of a list.

When you use it with only one argument, the list, it multiplies all the elements of the list. You can also give it a bound of start and end and it will only multiply the elements starting and ending at those indices (inclusive).

prod({1,2,3,4,5})
    120
prod({1,2,3,4,5},2,4)
    24
prod({1,2,3,4,5},3)
    60

Optimization

If the value of end is the last element of the list, it can be omitted:

prod({1,2,3,4,5},3,5)
can be
prod({1,2,3,4,5},3)

Error Conditions

  • ERR:DOMAIN if the starting or ending value aren't positive integers.
  • ERR:INVALID DIM if the starting or ending value exceed the size of the list, or are in the wrong order.

Source: parts of this page were written by the following TI|BD contributors: DarkerLine, GoVegan.

History

Calculator OS Version Description
TI-82 1.0 Added
Authors: Adrien Bertrand