diff --git a/contrib/pg_trgm/trgm_gin.c b/contrib/pg_trgm/trgm_gin.c
new file mode 100644
index 6a0731d..209128a
*** a/contrib/pg_trgm/trgm_gin.c
--- b/contrib/pg_trgm/trgm_gin.c
*************** gin_trgm_consistent(PG_FUNCTION_ARGS)
*** 190,200 ****
  				if (check[i])
  					ntrue++;
  			}
- #ifdef DIVUNION
- 			res = (nkeys == ntrue) ? true : ((((((float4) ntrue) / ((float4) (nkeys - ntrue)))) >= trgm_limit) ? true : false);
- #else
  			res = (nkeys == 0) ? false : ((((((float4) ntrue) / ((float4) nkeys))) >= trgm_limit) ? true : false);
- #endif
  			break;
  		case ILikeStrategyNumber:
  #ifndef IGNORECASE
--- 190,196 ----
*************** gin_trgm_triconsistent(PG_FUNCTION_ARGS)
*** 267,277 ****
  				if (check[i] != GIN_FALSE)
  					ntrue++;
  			}
- #ifdef DIVUNION
- 			res = (nkeys == ntrue) ? GIN_MAYBE : (((((float4) ntrue) / ((float4) (nkeys - ntrue))) >= trgm_limit) ? GIN_MAYBE : GIN_FALSE);
- #else
  			res = (nkeys == 0) ? GIN_FALSE : (((((float4) ntrue) / ((float4) nkeys)) >= trgm_limit) ? GIN_MAYBE : GIN_FALSE);
- #endif
  			break;
  		case ILikeStrategyNumber:
  #ifndef IGNORECASE
--- 263,269 ----
