Sha256: bfda725c55fcdf3664a3493f6aebc102bd94480d9bf55824f014c98bddac998c

Contents?: true

Size: 799 Bytes

Versions: 130

Compression:

Stored size: 799 Bytes

Contents

log←'./difference-of-squares.tc.log'
⍎ ')COPY ',(⎕FIO 30),'/../../test.apl'

test∆copy_relative 'difference-of-squares.apl'
test∆clear_log log

⍝ ∇square_of_sum

⍝ it returns the square of the sum from 1 to the given number
  1⎕CR square_of_sum 1
1
  1⎕CR square_of_sum 5 ⍝ (1+2+3+4+5)*2
225
  1⎕CR square_of_sum 100
25502500

⍝ ∇sum_of_squares

⍝ it returns the sum of the squares of the numbers from 1 to the given number
  1⎕CR sum_of_squares 1
1
  1⎕CR sum_of_squares 5 ⍝ (1*2)+(2*2)+(3*2)+(4*2)+(5*2)
55
  1⎕CR sum_of_squares 100
338350

⍝ ∇difference_of_squares

⍝ it returns square_of_sum minus sum_of_squares
  1⎕CR difference_of_squares 1
0
  1⎕CR difference_of_squares 5
170
  1⎕CR difference_of_squares 100
25164150

test∆show_log log

Version data entries

130 entries across 130 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/gnu-apl/exercises/difference-of-squares/difference-of-squares.tc
trackler-2.2.1.179 tracks/gnu-apl/exercises/difference-of-squares/difference-of-squares.tc
trackler-2.2.1.178 tracks/gnu-apl/exercises/difference-of-squares/difference-of-squares.tc
trackler-2.2.1.177 tracks/gnu-apl/exercises/difference-of-squares/difference-of-squares.tc
trackler-2.2.1.176 tracks/gnu-apl/exercises/difference-of-squares/difference-of-squares.tc
trackler-2.2.1.175 tracks/gnu-apl/exercises/difference-of-squares/difference-of-squares.tc
trackler-2.2.1.174 tracks/gnu-apl/exercises/difference-of-squares/difference-of-squares.tc
trackler-2.2.1.173 tracks/gnu-apl/exercises/difference-of-squares/difference-of-squares.tc
trackler-2.2.1.172 tracks/gnu-apl/exercises/difference-of-squares/difference-of-squares.tc
trackler-2.2.1.171 tracks/gnu-apl/exercises/difference-of-squares/difference-of-squares.tc
trackler-2.2.1.170 tracks/gnu-apl/exercises/difference-of-squares/difference-of-squares.tc
trackler-2.2.1.169 tracks/gnu-apl/exercises/difference-of-squares/difference-of-squares.tc
trackler-2.2.1.167 tracks/gnu-apl/exercises/difference-of-squares/difference-of-squares.tc
trackler-2.2.1.166 tracks/gnu-apl/exercises/difference-of-squares/difference-of-squares.tc
trackler-2.2.1.165 tracks/gnu-apl/exercises/difference-of-squares/difference-of-squares.tc
trackler-2.2.1.164 tracks/gnu-apl/exercises/difference-of-squares/difference-of-squares.tc
trackler-2.2.1.163 tracks/gnu-apl/exercises/difference-of-squares/difference-of-squares.tc
trackler-2.2.1.162 tracks/gnu-apl/exercises/difference-of-squares/difference-of-squares.tc
trackler-2.2.1.161 tracks/gnu-apl/exercises/difference-of-squares/difference-of-squares.tc
trackler-2.2.1.160 tracks/gnu-apl/exercises/difference-of-squares/difference-of-squares.tc