1
$\begingroup$

I have a Table statement that I don't understand:

scaledB = 
  Table[1. (# - A[[i, 1]])/A[[i, 2]] & /@ 
    B[[i]], {i, 1, Length[B]}];

Based on the docs and Google, I know this Table statement is Table[expr, {i, imin, imax} ]. I don't understand the 1. part in the expression. What does it do? I tried looking at the docs for expr and Googling a variety of keywords, but since I don't know what it's called, I've been unable to find any helpful docs.

$\endgroup$
3
  • 2
    $\begingroup$ That means it is an approximate number (i.e. it’s Head is Real). It is causing the entire calculation to use approximate numbers which can often be faster and more memory efficient. $\endgroup$
    – b3m2a1
    Commented Jul 24, 2018 at 4:29
  • $\begingroup$ Thanks, @b3m2a1! $\endgroup$
    – brienna
    Commented Jul 24, 2018 at 4:36
  • 1
    $\begingroup$ I am going to mark this question as already has an answer in a post that I hope you will find helpful. If you feel that this is inappropriate please let me know. $\endgroup$
    – Mr.Wizard
    Commented Jul 24, 2018 at 4:41

0

Browse other questions tagged or ask your own question.