Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Erasing some of the decimals in a list

This is a nice table to the reserve of the to long decimals

A=[[10,10,10,10,10,10,10,10,10,10],[100,0,0,0,0,0,0,0,0,0],[11.1,11.1,11.1,11.1,11.1,11.1,11.1,11.1,11.1,0]
,[20,20,20,20,20,0,0,0,0,0],[50,25,12.5,6.25,3.125,1.56,0.78,0.39,0.19,0.09]]
t=table(A,header_row=["$1$","$2$","$3$","$4$","$5$","$6$","$7$","$8$","$9$","$10$"],header_column=["","Équi-Rep","Tout pour un","Un déshérité","Injuste pour 1/2","$5$","Injuste croissante"])
show(t)

I have tried to construct a function f(x)=round(x,2) and then to use A.map_apply(f) but this doesnot works since f(x)=round(x,2) generates an error. How shouild I do ?