From 1c94d756a51d42f94a6e217c432952f9f6d74d5f Mon Sep 17 00:00:00 2001
From: kamischi <karl-michael.schindler@web.de>
Date: Wed, 12 Jun 2024 17:02:42 +0200
Subject: [PATCH] Comment about future refactor idea

---
 source/f90/seteps.f90 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/source/f90/seteps.f90 b/source/f90/seteps.f90
index 72fa34b..6ae2fc1 100644
--- a/source/f90/seteps.f90
+++ b/source/f90/seteps.f90
@@ -78,6 +78,8 @@ subroutine seteps(neps, nos, osc, epsinf, wn, name, eps, layers, mode)
           deno = 1.0d0 - deno
         endif
         if (cdabs(deno) == 0.0d0) then ! replace 0 by machine epsilon
+          ! if deno is always > 0 then this would do it: 
+          ! deno = cdmax(deno, epsilon(1.0d0) / 2)
           deno = epsilon(1.0d0) / 2
         endif
         eps(l) = eps(l) + osc(2, j) / deno
-- 
GitLab