summaryrefslogtreecommitdiff
path: root/problem45.ijs
diff options
context:
space:
mode:
authorPeter Mikkelsen <petermikkelsen10@gmail.com>2021-09-27 19:39:25 +0200
committerPeter Mikkelsen <petermikkelsen10@gmail.com>2021-09-27 19:39:25 +0200
commitbca82abccff2f44fc6d8891bd7cc12e15a10cfc6 (patch)
treec7c1e9c388b9010237e51aecc21ec8ecade2f10d /problem45.ijs
parent0bbf819f1b44932af767eb57df2afce0222f65ea (diff)
Problem 45
Diffstat (limited to 'problem45.ijs')
-rw-r--r--problem45.ijs13
1 files changed, 13 insertions, 0 deletions
diff --git a/problem45.ijs b/problem45.ijs
new file mode 100644
index 0000000..1986219
--- /dev/null
+++ b/problem45.ijs
@@ -0,0 +1,13 @@
+T =: {{ 0.5*y*y+1 }}
+P =: {{ 0.5*y*_1+3*y }}
+H =: {{ y*_1+2*y }}
+
+limit =: 1e5 NB. A guess that works
+
+'Ts Ps Hs' =: (T;P;H)i.limit
+
+isP =: e.&Ps
+isH =: e.&Hs
+isPH =: isP*.isH
+
+problem45 =: Ts{~3}.I.isPH Ts