Problems.tnk_g: def of unified-nsga-iii@0.2.2.0 Import: import unified-nsga-iii@0.2.2.0/problems.bend as Problems Lines 569-579 of unified-nsga-iii@0.2.2.0/problems.bend: https://jend.leeeet.dev/read.txt?path=unified-nsga-iii@0.2.2.0/problems.bend&start_line=569&end_line=579 import Base import unified-nsga-iii@0.2.2.0/util.bend as Util # C# TnkProblem. g0 = -(x²+y²-1-0.1 cos(16 atan(x/y))). g1 = 2((x-0.5)²+(y-0.5)²)-1. def tnk_g(+x: List<&2, F32>) -> List<&2, F32>: +x0 = Util.get_f32(x, 0n) +x1 = Util.get_f32(x, 1n) +circle = F32.sub( F32.sub(F32.add(F32.square(x0), F32.square(x1)), 1.0), F32.mul(0.1, F32.cos(F32.mul(16.0, F32.atan(F32.div(x0, x1))))) ) +dx = F32.sub(x0, 0.5) +dy = F32.sub(x1, 0.5) F32.neg(circle) <> [F32.sub(F32.mul(2.0, F32.add(F32.square(dx), F32.square(dy))), 1.0)] Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.atan https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.cos https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.neg https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.square https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/util.bend&name=get_f32