gmic blend mode divide looks unexpected

I wrote a small method to create a gradient and then tried to blend it with an black and white image:
gmic -input lamp.png -command foo.gmic -foo

foo :
  l
    (1080;1440)
	resize[1] {0,w},{0,h},1,3,3
    rotate[1] 180
    hsv2rgb[1]
  endl
  
  --blend[0,1] and
  --blend[0,1] multiply 

The result looks like this:

If I add an rgb2srgb[1] after the hsv2rgb[1] the blending looks better, but the gradient is broken:

Then I’ve rendered the gradient to an file and used the same blend mode:
gmic -input lamp.png gmic_000000.png -command foo.gmic -foo2

foo2 :
  resize[1] {0,w},{0,h},1,3,3
  --blend[0,1] and
  --blend[0,1] multiply 

What do I need to change in the first version to get the same results then the last version?

Perhaps a normalize to the same value range as the input:

foo :
  l
    (1080;1440)
    resize[1] {0,w},{0,h},1,3,3
    mirror[1] y
    hsv2rgb[1]
    n[1] {0,[im,iM]}
  endl

But check your value ranges and number of channels, that could be wrong still

Thanks, that works perfectly.