Skip to content

Commit

Permalink
Merge pull request #988 from herbie-fp/zane-log-transform
Browse files Browse the repository at this point in the history
Add new benchmark for log transform.
  • Loading branch information
zaneenders authored Sep 13, 2024
2 parents 02e7ec5 + 3132a80 commit 1a4f2f3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bench/graphics/log-transform.fpcore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
; This example is taken from the Image Processing domain and referred to
; as "Logarithmic Transform". This in its basic form is used to bring out
; details in dark parts of an image. This instantiation of the idea is for 1D
; as opposed to 2D images.

(FPCore (c x y)
:name "Logarithmic Transform"
:alt
(* c (log1p (* (expm1 x) y)))

(* c (log (+ 1.0 (* (- (pow E x) 1.0) y)))))

0 comments on commit 1a4f2f3

Please sign in to comment.